On 18 Dec (20:49), Gavin King wrote:

> So: Do people USE this feature?? Have people really actually found uses 
> for this stuff, or is it actually just making Hibernate harder to
> understand 
> for the first time? Even if it has been useful, is perhaps *still*
> undesirable, 
> because of concerns about data integrity? Perhaps we simply shouldn't 
> be encouraging this kind of relational model.....

I tried once to use toplevel collections, because I had a "collection of
collections" and the collection could be referenced by two different
classes.

The mapping wasn't hard to understand, but the restrictions on the
load/delete/update killed them for me. 

Using a Hibernate Session is straightforward if you don't use toplevel
collections, the only thing to keep in mind is handling bidirectional
associations with setparent/setchild on both ends. 

Toplevel collections add a lot more overhead to this handling routines,
which is what kept me from using it. As soon as I realized that, I
stopped even thinking about using a toplevel collection and change my
models accordingly. I bet a lot of people are doing the same, the
benefits of toplevel collections would be nice, but dealing with them is
not.

My point is: For every aspect thats on your "plus" side for toplevel
collections, find a different way of implementing it without a toplevel
collection, then compare the effort for both methods and decide wether
this justifies an additional idiom (tl collections) in Hibernate or not.

Data Integrity: I'm not a DB newbie, so I noticed the missing foreign
key on first sight. But this is just the implementation of toplevel
collections, which could be changed if the idiom itself is worth it. 

-- 
Christian Bauer
[EMAIL PROTECTED]


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to