kundera icon indicating copy to clipboard operation
kundera copied to clipboard

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

Open AntonYudin opened this issue 8 years ago • 2 comments

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.

AntonYudin avatar Feb 01 '18 00:02 AntonYudin

@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

karthikprasad13 avatar Feb 05 '18 09:02 karthikprasad13

It will be fixed with - https://github.com/Impetus/Kundera/pull/998

devender-yadav avatar May 22 '18 06:05 devender-yadav