Forum OpenACS Development: Re: Best practice for retrieving old version with related items

Posted by Dave Bauer on
Ah in this case you could use the revision_id of the Budget as the parent_id since any object can be a parent_id in cr_items.
if I use the revision_id of the budget I would be forced to create new budgetItems for each revision of the Budget, though I actually might only change attributes of Budget (generating a new revision), but keep the budgetitems as they were before.

And then I would either have to duplicate the BudgetItems, as I can't have multiple parent_ids. Maybe I should have used acs_rels where a BudgetItem's revision is related to a Budget revision, this way allowing for an n:m relationship.

Thanks for your quick reply Dave.