• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Order and Item model in Hibernate  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!