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:
Britt Park
2006-05-20 18:02:02 +00:00
parent 2ee957f5e2
commit 6c1801b9ff
4 changed files with 18 additions and 6 deletions

View File

@@ -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);