Skip to content
Snippets Groups Projects
Commit 0acf1919 authored by srosse's avatar srosse
Browse files

no-jira: fix issue with hibernate 4.3

parent 48b95690
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,8 @@ public class RosterDAO { ...@@ -111,7 +111,8 @@ public class RosterDAO {
} }
public void deleteEntry(Identity identity, OLATResourceable ores) { public void deleteEntry(Identity identity, OLATResourceable ores) {
dbInstance.getCurrentEntityManager().createNamedQuery("deleteIMRosterEntryByIdentityAndResource") String del = "delete from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname";
dbInstance.getCurrentEntityManager().createQuery(del)
.setParameter("identityKey", identity.getKey()) .setParameter("identityKey", identity.getKey())
.setParameter("resid", ores.getResourceableId()) .setParameter("resid", ores.getResourceableId())
.setParameter("resname", ores.getResourceableTypeName()) .setParameter("resname", ores.getResourceableTypeName())
......
...@@ -48,8 +48,7 @@ import org.olat.core.id.Persistable; ...@@ -48,8 +48,7 @@ import org.olat.core.id.Persistable;
@NamedQuery(name="loadIMRosterEntryByIdentityandResource", query="select entry from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname"), @NamedQuery(name="loadIMRosterEntryByIdentityandResource", query="select entry from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname"),
@NamedQuery(name="loadIMRosterEntryForUpdate", query="select entry from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname", @NamedQuery(name="loadIMRosterEntryForUpdate", query="select entry from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname",
lockMode=LockModeType.PESSIMISTIC_WRITE), lockMode=LockModeType.PESSIMISTIC_WRITE),
@NamedQuery(name="loadIMRosterEntryByResource", query="select entry from imrosterentry entry where entry.resourceId=:resid and entry.resourceTypeName=:resname"), @NamedQuery(name="loadIMRosterEntryByResource", query="select entry from imrosterentry entry where entry.resourceId=:resid and entry.resourceTypeName=:resname")
@NamedQuery(name="deleteIMRosterEntryByIdentityAndResource", query="delete from imrosterentry entry where entry.identityKey=:identityKey and entry.resourceId=:resid and entry.resourceTypeName=:resname")
}) })
public class RosterEntryImpl implements Persistable, CreateInfo { public class RosterEntryImpl implements Persistable, CreateInfo {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment