Use the example from hibernate-reference manual: <class name="eg.Parent"> <id name="id" column="id"/> <set role="children" readonly="true" lazy="true"> <key column="parent_id"/> <one-to-many class="eg.Child"/> </set> </class> <class name="eg.Child"> <id name="id" column="id"/> <many-to-one name="parent" class="eg.Parent" column="parent_id"/> </class>
Here the children set in the Parent object is readonly. Does it mean any modification to any "Child element" in the Children set will not be persisted to database( an violation of usual persistence by reachability)? In this sense, the "readonly" applies to the set element. Or Does it mean any addition and removal from the Children set will not be persisted to the database? In this sense, the "readonly" applies to the set itself. If we have a bidirectinoal association, but I do not specify the readonly for one end of the association. What can be resulted from it? Also why can the "readonly" attribute not be specified for <list> element? Thanks Guys jason __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel