Hi Mark, Is there a performance reason why you don't just do a count on the packages that match the order?
mrg On Thu, Oct 30, 2014 at 11:00 AM, Mark Stobbe <[email protected]> wrote: > Hi all, > > I was wondering what is the best way to update totals in a multi-user > environment. For example, let's say we have an Order which can have one or > more Packages associated and we want to maintain a total package count on > the Order entity. How would you update this value when the user has the > option to add/remove packages. > > So the entities looks like: > > *Order* > -------- > id : bigint > orderNumber : varchar > nrOfPackages : int > > *Package* > ------------ > id : bigint > packageNumber : varchar > *fk_order : bigint* > > What do you guys use to solve this? > Mark
