mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed permissions data access
Some tweaks to select and joins git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2816 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,7 @@ package org.alfresco.repo.domain.hibernate;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.hibernate.CallbackException;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.classic.Lifecycle;
|
||||
@@ -37,6 +38,10 @@ public abstract class LifecycleAdapter implements Lifecycle
|
||||
*/
|
||||
protected Session getSession()
|
||||
{
|
||||
if (session == null)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Hibernate entity is not part of a session: " + this);
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user