mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added a natural-id element to mapping definition for ChildEntries.
Added two apparently necessary hibernate flushes. Added a createSnapshot call after unzipping in ImportWebsiteDialog. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3896 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -806,6 +806,7 @@ class LayeredDirectoryNodeImpl extends DirectoryNodeImpl implements LayeredDirec
|
|||||||
{
|
{
|
||||||
ChildEntry entry = AVMContext.fgInstance.fChildEntryDAO.getByNameParent(name, this);
|
ChildEntry entry = AVMContext.fgInstance.fChildEntryDAO.getByNameParent(name, this);
|
||||||
AVMContext.fgInstance.fChildEntryDAO.delete(entry);
|
AVMContext.fgInstance.fChildEntryDAO.delete(entry);
|
||||||
|
AVMContext.fgInstance.fAVMNodeDAO.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make the new ChildEntry and save.
|
// Make the new ChildEntry and save.
|
||||||
|
@@ -445,6 +445,8 @@ class PlainDirectoryNodeImpl extends DirectoryNodeImpl implements PlainDirectory
|
|||||||
}
|
}
|
||||||
// Get rid of the DELETED_NODE child.
|
// Get rid of the DELETED_NODE child.
|
||||||
AVMContext.fgInstance.fChildEntryDAO.delete(child);
|
AVMContext.fgInstance.fChildEntryDAO.delete(child);
|
||||||
|
// Another &*#*&#$ flush.
|
||||||
|
AVMContext.fgInstance.fAVMNodeDAO.flush();
|
||||||
}
|
}
|
||||||
// Make the new entry and save.
|
// Make the new entry and save.
|
||||||
ChildEntry newChild = new ChildEntryImpl(name, this, node);
|
ChildEntry newChild = new ChildEntryImpl(name, this, node);
|
||||||
|
@@ -141,9 +141,11 @@
|
|||||||
<id name="id" column="id" type="long">
|
<id name="id" column="id" type="long">
|
||||||
<generator class="native"/>
|
<generator class="native"/>
|
||||||
</id>
|
</id>
|
||||||
|
<natural-id>
|
||||||
|
<property name="name" type="string" length="160" column="name" index="child_name_index" not-null="true"/>
|
||||||
|
<many-to-one name="parent" column="parent_id" class="DirectoryNodeImpl" not-null="true"/>
|
||||||
|
</natural-id>
|
||||||
<version name="vers" column="vers" type="long"/>
|
<version name="vers" column="vers" type="long"/>
|
||||||
<property name="name" type="string" column="name" index="child_name_index" not-null="true"/>
|
|
||||||
<many-to-one name="parent" column="parent_id" class="DirectoryNodeImpl" not-null="true"/>
|
|
||||||
<many-to-one name="child" column="child_id" class="AVMNodeImpl"
|
<many-to-one name="child" column="child_id" class="AVMNodeImpl"
|
||||||
not-null="true"/>
|
not-null="true"/>
|
||||||
</class>
|
</class>
|
||||||
|
Reference in New Issue
Block a user