-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
I have a POJO with a constructor of some fields (some are objects like a String, others are primitive types like boolean or short).
If I do a "select new MyPojo(...)" query, it works fine and the POJO is created as expected.
But when using the #project(..) method from PanacheQuery, I get an error for a missing constructor. Only if I change the constructor of the POJO to have no primitive types but the object types (long->Long, boolean->Boolean) this works again.
Expected behavior
The Panache projection should also work with primitive types.
Actual behavior
No response
How to Reproduce?
Working:
((Session) MyEntity.getEntityManager()).createQuery("select new MyPojo(attribString, attribBoolean) from MY_ENTITY).list();
Not working:
MyEntity.find(select attribString, attribBoolean) from MY_ENTITY).project(MyPojo.class).list()
Output of uname -a
or ver
No response
Output of java -version
21
Quarkus version or git rev
3.14.4
Build tool (ie. output of mvnw --version
or gradlew --version
)
mvn
Additional information
No response