Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.4
-
None
Description
After DELTASPIKE-978 in repository no possible to select non Entity object via Native query.
For example(very simple):
@Query( isNative = true, value = " SELECT name FROM actions ") @Override public abstract Collection<String> listActions();
Reason:
Changes in AnnotatedQueryBuilder.java
- result = params.applyTo(entityManager.createNativeQuery(jpqlQuery));
+ result = params.applyTo(entityManager.createNativeQuery(jpqlQuery, context.getEntityClass()));
Now native query can return only Entity of this repository.