Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra scalar native queries return a List<Map<String, Object>> or List<RandomEntity> instead of List<Object[]> #984

Open
AntonYudin opened this issue Feb 1, 2018 · 2 comments

Comments

@AntonYudin
Copy link
Contributor

According to the specification, createNativeQuery(String) is supposed to return a List<Object[]>.
Java EE 7 API

Right now if the persistence context contains an Entity defined, the query will return a list of a Entity class instances (I'm not sure how kundera decides which Entity to choose).

According to the test, Kundera returns a List<Map<String, Object>> if there are no Entities defined in the context.

If I were to create a pull request that will make kudera's createNativeQuery(String) compatible with the specification, would you consider merging it?

Thanks.

@karthikprasad13
Copy link
Collaborator

@AntonYudin

We created it for the ease it provides in getting an object (row value) by column name. We can make it compatible if it is a blocker or requirement.

We can discuss more about your pull request on gitter.

-Karthik

@devender-yadav
Copy link
Contributor

It will be fixed with - #998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants