This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark ""select new Constructor" in HQL" Watch ""select new Constructor" in HQL" New topic
Author

"select new Constructor" in HQL

nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
I have a strange failure:

I have a constructor with fullfills this:



(intValueA, intValueB are Integers)

this works.

This works, too:



But when I use the sum-aggregation:



this failure occurs:



My Constructor:




Why does my Constructor not work, when I use the SUM-Aggregation???
nimo frey
Ranch Hand

Joined: Jun 28, 2008
Posts: 580
Okay, solved.

The datatypes were wrong. I have used Integer instead of Long.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "select new Constructor" in HQL
 
Similar Threads
[JPA/TOPLINK] is the function "lower" supported in "order by" clause? if not, how....
Some queries regarding Hibernate Session Behaviour?
What is In clause
retrive value not getting
bind variable does not exist