From: Gavin K. <Gav...@ex...> - 2002-12-18 09:50:00
|
I'm (again) considering deprecating toplevel collections and subcollections=20 in Hibernate 2.0. I was never completely happy with this feature after I implemented it, but it had taken so much effort to get it to work that I left it in. The case against toplevel collections is: * the relational model is broken - there is no foreign key constraint from=20 collection element row to the owning row * subcollections complicate code in SessionImpl _significantly_ The case for keeping them is: * they let you persist a Java "collection of collections" * they let you have a single table / collection mapping that can be used by=20 different owning classes * instances of a toplevel collection can be passed between different owners=20 (even between owners of a different class, potentially) without needing to=20 remove and recreate the collection rows * they currently work and I havn't needed to touch the complicated code for=20 a long time now So: Do people USE this feature?? Have people really actually found uses=20 for this stuff, or is it actually just making Hibernate harder to understand=20 for the first time? Even if it has been useful, is perhaps *still* undesirable,=20 because of concerns about data integrity? Perhaps we simply shouldn't=20 be encouraging this kind of relational model..... I need advice on this. Gavin ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |