Hi,
How would I handle a situation where my object needs to have a property that is based on information in another table in a somewhat complex way :)
For example, say you had an Account object that represents the account of one user and one property of that is how much that user has spent buying stuff from you. That property would then be a sum of all of the amounts in a purchases table/object rather than an actual item in the account table.
Would I just put code in the set/get methods in the Account object to query the purchases table and set this, or is there another way to accomplish this?
|