[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2087) lazy="extra" on Set's is broken - operationQueue is not considered when accessing set
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Tue Sep 19 05:44:24 EDT 2006
lazy="extra" on Set's is broken - operationQueue is not considered when accessing set
-------------------------------------------------------------------------------------
Key: HHH-2087
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2087
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.cr4
Reporter: Max Rydahl Andersen
Priority: Critical
adding to a loaded list is not reflected in the .size() method (and addAll() is possibly also affected)
I created ExtraLazyTest.testExtraLazySet in the test suite that shows the issue.
User person = (User) s.get(User.class, gavin.getName());
new Document( "Fresh", "word", person );
System.out.println("Writing out the persons documentes (Set). Expected to find 3 but it only contains 2.");
for (Iterator iter = person.getDocuments().iterator(); iter.hasNext();) { // changes should be written at this time...
Document doc = (Document) iter.next();
System.out.println("phoneNumber: " + doc);
}
assertTrue(person.getDocuments().size() == 3);
Changing PeristentSet.endRead() to:
public boolean endRead() {
set.addAll(tempList);
tempList = null;
return afterInitialize(); // ensures that operationQueue is considered.
}
makes it work.
--
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