File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Order and Item model in Hibernate" Watch "Order and Item model in Hibernate" New topic

Order and Item model in Hibernate

Akhtar Gagloo

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?
I agree. Here's the link:
subject: Order and Item model in Hibernate
It's not a secret anymore!