File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Order and Item model in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Order and Item model in Hibernate" Watch "Order and Item model in Hibernate" New topic
Author

Order and Item model in Hibernate

Akhtar Gagloo
Greenhorn

Joined: Feb 08, 2007
Posts: 4
I am designing an application where order has many items and order and items have statuses. When status of any item changes to available, order is retrieved and status of the all items of order are evaluated before changing the status of order from in-progress to complete. It seems pretty time consuming. Is there better efficient way to model this problem in hibernate. If there are examples I appreciate if you can post it. Status of items can change in random order and there are multiple status to the items. I just simplified it for understanding in this post.

I am trying to see if any hibernate solutions are available especially about automatically changing the status of the order when item status changes.In object model you can create a status listener for order and listen to status of items and accordingly change the status. Creating a bidirectional relationship in relationship mode from order to items and items to order seems doable but not efficient.

Any thoughts?
Akhtar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Order and Item model in Hibernate
 
Similar Threads
EJB relationship mapping OneToMany bidrectional
Hibernate performance with collection
Question on part 2
tools of the hibernator
[JPA] Two providers, two different bahaviours - is switching really a piece of cake?