On Oct 12, 2006, at 6:11 PM, Peter Bell wrote:
Hi Josh,
I would think very carefully before using an ORM to implement versioning as
most ORMs are designed to think of object identity (ProductID, UserEmail, UUID,
whatever). In a versioning system you have both object identity and version
identity within the object identity (similar problems arise when you want to
have locale specific versions of content). I am not saying you shouldn’t use
Reactor for the project, but I’d think through all of the implications of your
versioning identity management rules as if you don’t have a lot of complex O-R
mapping issues, you may be better off writing a persistence abstraction layer
that is natively aware of version identity and handles stuff like deleting all
versions if you delete the object and handling promoting of a version if you
delete or insert another version and so on.
You could look at wrapping your persistence layer around Reactor – that might
actually be a really good approach, but I’d think twice about manually just
hacking as per Brads suggestion because there are a bunch of those hacks you’re
going to have to put in to handle all of the issues that arise when
implementing a versioning system.
Not that the hack is bad per see – it’s probably what I’d do to solve that
specific problem, but I think you might run into a bunch of such problems and
it may we worth rolling a layer to abstract the handling of identity
persistence.
Best Wishes,
Peter
On 10/12/06 5:50 PM, "Brad Haas" <[EMAIL PROTECTED]>
wrote:
What if you created a new instance of the object and just
copied the data to it with the exception of the primary key. It may not
be pretty, but it may solve your problem.
Brad
On Oct 12, 2006, at 5:05 PM, Joshua Scott wrote:
All,
I have a content management system using reactor and modelglue. I am
working on version two and one of the features is a revision system allowing
people to save drafts of content.
What I need to be able to do is save a PageContent content object and
force an insert instead of an update. I thought I could do this by forcing the
pkey to 0, but that does not work.
How would I go about this?
Thanks for the help in advance.
Josh
------------------------------------------------
Joshua Scott
Resonant Media Technologies, LLC.
www.resonantmedia.com <http://www.resonantmedia.com>
| blog.resonantmedia.com
"It is impossible to get out of a problem by using
the same type of thinking that it took to get into the problem." -- Albert
Einstein
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--