Community
Participate
Working Groups
Build Identifier: I20110613-1736 Can't set primitive type from JPA Details view as @NamedNativeQuery#resultClass Reproducible: Always Steps to Reproduce: 1. Create enitty 2. Open JPA Details view 3. Open Queries 4. Add NamedNativeQuery 5. set void or int like resultClass in ui FAILURE: in source you'll see 'voi' or 'in'
Created attachment 201310 [details] Allow primitives Result class also could be a primitive class, should be allowed.
The current behavior isn't very desirable, but wouldn't you only specify the resultClass if you were identifying an entity? Seems odd to specify an int as the result class. Regardless, there is some work to be done here.
Nail, I expected it is possible to execute a query like "SELECT count(emp1.emp_id) FROM emp emp1" with int.class result, but this is really not possible, and even Integer.class does't work. So I think the issue should be rejected.
Ideally our UI would handle this more gracefully, so I would like to leave this bug open, but it probably isn't very likely that we will fix it directly.
Comment on attachment 201310 [details] Allow primitives Marking this patch as obsolete for reporting purposes.