aspose file tools*
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
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: 16305
    
  21

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?