• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[Hibernate] Derived totals

 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Pho Tek
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic