mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Figured out the hibernate problem. Foolishness on my part. ContentBeanImpl was missing a
default constructor. Minor mods to the mapping file to fix my self made difficulty. AVMNodeFactory now does the right thing with hibernate proxies. Test now extends to creating a file in a directory in a repository. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2928 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,6 +22,7 @@ import org.alfresco.repo.avm.hibernate.LayeredDirectoryNodeBean;
|
||||
import org.alfresco.repo.avm.hibernate.LayeredFileNodeBean;
|
||||
import org.alfresco.repo.avm.hibernate.PlainDirectoryNodeBean;
|
||||
import org.alfresco.repo.avm.hibernate.PlainFileNodeBean;
|
||||
import org.hibernate.proxy.HibernateProxy;
|
||||
|
||||
/**
|
||||
* Responsible for instantiating AVMNode concrete subclasses from
|
||||
@@ -40,6 +41,8 @@ public class AVMNodeFactory
|
||||
{
|
||||
return null;
|
||||
}
|
||||
HibernateProxy proxy = (HibernateProxy)bean;
|
||||
bean = (AVMNodeBean)proxy.getHibernateLazyInitializer().getImplementation();
|
||||
if (bean instanceof PlainFileNodeBean)
|
||||
{
|
||||
return new PlainFileNode((PlainFileNodeBean)bean);
|
||||
|
Reference in New Issue
Block a user