This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes [Hibernate] Derived totals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "[Hibernate] Derived totals" Watch "[Hibernate] Derived totals" New topic
Author

[Hibernate] Derived totals

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 776

I would like to ask for some design advice.

Both Company and Outlet are Hibernate persistent classes.
Whenever a sale is made at the Outlet, we will increase the sale value and counts in tandem for the Outlet. I would like to know how you whether: is it good to also update the totals in Company as well during a sale tx ? In general how do you handle derived totals like this ? In Hibernate, how would you propogate changes like these ?
Regards,
Pho
[ March 18, 2004: Message edited by: Pho Tek ]

Regards,

Pho
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 776

I'm reading about the MonthEndClosing pattern and it seems like a possible solution. So rather than cascade the totalling up process at the actual moment of sale; it could be done at EOD. What do you think ?
Regards,
Pho
 
Have you checked out Aspose?
 
subject: [Hibernate] Derived totals
 
jQuery in Action, 3rd edition