mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Point checkin. Hibernate is currently beating me up by not doing
what I expect when trying to determine the concrete type of a polymorphic type. Some major surgery seems to be in order. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -99,6 +99,7 @@ public class RepositoryImpl implements Repository
|
||||
fData.setRoot(rootBean);
|
||||
fData.getRoots().put(fData.getNextVersionID(), rootBean);
|
||||
fData.setNextVersionID(fData.getNextVersionID());
|
||||
fSuper.getSession().save(fData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -142,6 +142,8 @@ public class SuperRepositoryImpl implements SuperRepository
|
||||
// Newing up the object causes it to be written to the db.
|
||||
@SuppressWarnings("unused")
|
||||
Repository rep = new RepositoryImpl(this, name);
|
||||
// Special handling for repository creation.
|
||||
rep.getDataBean().getRoot().setIsNew(false);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -485,7 +487,7 @@ public class SuperRepositoryImpl implements SuperRepository
|
||||
*/
|
||||
private Repository getRepositoryByName(String name)
|
||||
{
|
||||
Query query = fSession.createQuery("from repositories r where r.name = :name");
|
||||
Query query = fSession.createQuery("from RepositoryBeanImpl r where r.name = :name");
|
||||
query.setString("name", name);
|
||||
return new RepositoryImpl(this, (RepositoryBean)query.uniqueResult());
|
||||
}
|
||||
|
Reference in New Issue
Block a user