Ensure initialization of the Hibernate association bags

- If uninitialized (e.g. by a size() call), then the new assocations added are queued for addition
 - These then become duplicated within the session (not the DB) and appear as duplicate associations during integrity checking
Fixed test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2741 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-05-03 12:33:26 +00:00
parent c9e5bd6c22
commit f08c44025d
3 changed files with 11 additions and 0 deletions

View File

@@ -263,6 +263,7 @@ public class HibernateNodeTest extends BaseSpringTest
// make a content node
Node contentNode = new NodeImpl();
contentNode.setStore(store);
contentNode.setUuid(GUID.generate());
contentNode.setTypeQName(ContentModel.TYPE_CONTENT);
Serializable contentNodeId = getSession().save(contentNode);