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 JPA native query, group function, different entity 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 "JPA native query, group function, different entity" Watch "JPA native query, group function, different entity" New topic
Author

JPA native query, group function, different entity

Bruno Frascino
Ranch Hand

Joined: Jul 22, 2003
Posts: 55
Hello all,

I have got an exciting problem.
I have got the following native query:



As you see, this will return 4 different dates for me, and they need to populate another entity instead of date_table, which i got the values from.
So, this is the question:

"How can I select values from a table A to populate actually not the entity related to table A but an entity B related to table B?"

I am trying to use native query and resultSetMapping, but I keep getting an error, invalid column name from Hibernate. I don't know how could I do it not using nativequery.

I'd appreciate any help, thanks!


--BJCK--
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JPA native query, group function, different entity
 
Similar Threads
Regular expression - Pattern and matcher
Oracler Date function
Native query always returning same data
how to pass array value in sql
Need help - Lot of joins are slowing down my query