Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354482 - Can't set primitive type from ui as @NamedNativeQuery#resultClass
Summary: Can't set primitive type from ui as @NamedNativeQuery#resultClass
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 08:33 EDT by Dmitry Geraskov CLA
Modified: 2012-04-10 11:24 EDT (History)
1 user (show)

See Also:


Attachments
Allow primitives (1.89 KB, patch)
2011-08-11 08:35 EDT, Dmitry Geraskov CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Geraskov CLA 2011-08-11 08:33:46 EDT
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'
Comment 1 Dmitry Geraskov CLA 2011-08-11 08:35:54 EDT
Created attachment 201310 [details]
Allow primitives

Result class also could be a primitive class, should be allowed.
Comment 2 Neil Hauge CLA 2011-08-11 18:24:19 EDT
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.
Comment 3 Dmitry Geraskov CLA 2011-08-12 03:47:05 EDT
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.
Comment 4 Neil Hauge CLA 2011-08-12 16:36:58 EDT
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 5 Neil Hauge CLA 2012-04-10 11:24:09 EDT
Comment on attachment 201310 [details]
Allow primitives

Marking this patch as obsolete for reporting purposes.