[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2306) put() fails on lazy one-to-many Map
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Apr 10 15:57:06 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-2306.
-------------------------------
Assignee: Steve Ebersole
Resolution: Duplicate
(and since I know you'll ask -> try the search... it works great!)
> put() fails on lazy one-to-many Map
> -----------------------------------
>
> Key: HHH-2306
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2306
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.0.ga, 3.2.1
> Environment: HIbernate 3.2.1. with Mysql 4
> Reporter: Andreas Idl
> Assignee: Steve Ebersole
> Priority: Critical
> Attachments: MapTest.zip
>
>
> If I add n objects to a lazy-loaded one-to-many map, the first added object is not contained afterwards.
> The size of the map is (n-1).
> Document document = (Document) session.load(Document.class,documentId);
> DocumentHistory history = new DocumentHistory();
> history.setVersion(1);
> history.setTitle(document.getTitle());
> history.setContent(document.getContent());
> history.setDocument(document);
> // Put the new history into the map.
> Map<Integer, DocumentHistory> histories = document.getHistories();
> histories.put(history.getVersion(), history);
> //not equal because histories.size() is 0
> assertEquals(1, histories.size());
--
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/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list