EOF Design Questions
Ashley Aitken <[email protected]> Thu, 8 Apr 2004 14:44:09 +0800
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Howdy All, The standard use of EOF is something like this: Fetch a number of EOs into an EC (as needed). Make changes to some or all of the EOs, i.e. EOi(StateAi) ---> EOi(StateBi) Add some new EOs or delete some of the fetched EOs I am wondering how to the following efficiently, after the above: Clone all the EOs in the EC that have been change, i.e. EOi(StateBi) ---> EOj(StateBi) Revert only the original EOs to their fetched state, i.e. EOi(StateBi) ---> EOi(StateAi) Note: Any deleted EOs would not be cloned but still reverted, i.e. no-longer deleted Make some more changes to the original fetched EOs, i.e. EOi(StateAi) ---> EOi(StateCi) Save all the originally fetched EOs and new EOs i.e. ec.saveChanges() Note: The new EOs include (really) new EOs and cloned EOs. I've looked at the APIs for EC and EOGenericRecord and nothing pops out, specifically with respect to: 1. How best to clone an EO in an EC? Create and insert a new EO, transfer state, ... 2. How best to revert some EOs (but not all) in the EC? Using the original snapshot ... but could that change (is that a problem)? Any suggestions, important API calls, pseudocode, would be most appreciate. Thanks in advance, Ashley Aitken. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com