Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

[NHibernate-development] Encapsulated object (Serialized LOB)

Paul Hatcher

2008-03-19

Replies: Find Java Web Hosting

Author LoginPost Reply

Have a 'nice' idea for a feature for NHibernate, might need to wait until post-2.0 though...

One thing we seem to be missing is a the ability to persist an object or collection within an entity; I know we have component, but that's slightly different in that it still persists on a property-per-column basis and what I want is the ability to bundle up a sub-graph of an object and store it into a database column, either as XML or binary.

You can see this pattern mentioned in most of the Ambler papers (plus Fowler), but I haven't see a framework that does it yet.

I've got one project at the moment where it would solve a bunch of problems;  have a parent-children structure where the children are owned by the parent and have a coupled lifespan. Now, what we need to do is version the parent so that changes to the parent's properties or to a child cause a new version of the parent to be created. I've got this working fairly nicely with just a parent object using a view that delivers the latest and instead-of triggers to write the underlying object, but this gets much more complicated when you introduce a child table.

Comments?

Paul

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.