(Flames accepted if this bump is inappropriate.)

jonah.blossom wrote:
Greetings,

I've been using frameworks for a few projects now - pretty awesome stuff. On my latest I'm using Reactor for the first time - great really great.

So, anyway - I need to implement some functionality in this app. and am wondering if there's a clean way to do it with reactor or if I essentially have to write a custom function to do so.

(Preface, I've dug through the docs, trac, numerous blogs and the mailing list archive in search of an answer. Apparently, it's never been asked or I just don't know what others have called this type of issue.)

Here goes: I create relatively complex records (with several one-to-one, one-to-many, and many-to-many relationships. (But only about two levels of depth - i.e. an object in a one-to-many relationship with the main record has a one-to-one as a child.)

What I need to do is be able to load a record and then duplicate the entire tree as a new un-saved record, so that I can modify it and then save the whole thing as a new set of records in the various tables (independent of the records of the object I copied it from as in the one-to- relationships.)

So, I had the idea that if I call setID("") on the main record and then save it, that would work. Well, kinda. It keeps the one-to-one relationships, but any one-to-many relationships through linking tables are lost in the process.

So, my question is does Reactor provide a straightforward way to essentially reset all the nested records to an essentially new-un-saved state? Or do I just need to write some code to load my existing record and a new empty one, then go through each relationship in the existing record, copy out each record, call setID("") and then add it to the new record?

TIA!
.jonah



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to