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 JSF and the fly likes How to add Multiple ManyToOne mapping in single POJO and get records from multiple table? 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 » Java » JSF
Bookmark "How to add Multiple ManyToOne mapping in single POJO and get records from multiple table?" Watch "How to add Multiple ManyToOne mapping in single POJO and get records from multiple table?" New topic
Author

How to add Multiple ManyToOne mapping in single POJO and get records from multiple table?

Rocky Menezes
Greenhorn

Joined: Sep 10, 2013
Posts: 3


I have tables Order(orderno,orderdate,suppid)
Supplier(suppid,suppname)
orderdetails(orderdetailid,orderno)
I wanted to get result like this using JPA
orderno,orderdate,suppname,orderdetailid
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961
    
  19

Welcome to the JavaRanch, Rocky!

You would get better answers if you asked that question in the JPA ORM forum. That's where the experts on JPA hang out. This forum is the one where you can get help on JSF.

Just for information, however, I actually have JSF applications that use JPA to do exactly what you are asking. All I did was code multiple @ManyToOne properties in definition of the entity that was at the top of the working set to be returned. Along with some DAO-level code that forced fetching, where needed.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add Multiple ManyToOne mapping in single POJO and get records from multiple table?
 
Similar Threads
CMR relationship prob.
EJB QL Help
Converting int to String
Retriving data from table
Issue with command button image in data table.