From: <leg...@at...> - 2003-06-10 03:07:18
|
The following comment has been added to this issue: Author: Gavin King Created: Mon, 9 Jun 2003 10:06 PM Body: That line of code is correct. Are you *sure* that your composite element class implements equals() / hashCode() correctly, as is required by the Set contract? I doubt that there is a bug in Set.... --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-124 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-124 Summary: Hibernate thinks unmodified <set> of value objects is dirty Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.0 final Assignee: Reporter: Chris Richardson Created: Sun, 8 Jun 2003 7:36 PM Updated: Sun, 8 Jun 2003 7:36 PM Environment: Win2k Description: Hibernate thinks that a collection of value objects is modified when it really isn't. It tries to save it to the DB everytime it is loaded. This line from Set.snapshot looks suspect: clonedSet.put(copied, copied); Shouldn't the key be the original value - not the copy? Here is an excerpt of my mapping file: <set name="timeRanges" table="FTGO_RESTAURANT_TIME_RANGE" cascade="all"> <key column="RESTAURANT_ID"/> <composite-element class="net.chrisrichardson.foodToGo.order.hibernateImpl.HibernateTimeRange"> <property name="dayOfWeek" column="day_Of_Week"/> <property name="openHour" column="open_Hour"/> <property name="openMinute" column="open_Minute"/> <property name="closeHour" column="close_Hour"/> <property name="closeMinute" column="close_Minute"/> </composite-element> </set> --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |