fix error update postgresql database owner

This commit is contained in:
Peter Hormanns 2013-07-15 12:25:47 +02:00
parent fde6cbd9cd
commit c0413f7deb

View File

@ -75,8 +75,8 @@ public class PgSqlDatabaseModuleImpl extends AbstractModuleImpl {
Transaction transaction = getTransaction();
EntityManager em = transaction.getEntityManager();
UnixUser unixUser = transaction.getLoginUser();
MySqlDatabase detachtedDB = (MySqlDatabase) existingEntity;
MySqlDatabase attachedDB = em.find(MySqlDatabase.class, detachtedDB.getId());
PgSqlDatabase detachtedDB = (PgSqlDatabase) existingEntity;
PgSqlDatabase attachedDB = em.find(PgSqlDatabase.class, detachtedDB.getId());
if (!attachedDB.getName().equals(detachtedDB.getName())) {
throw new AuthorisationException(unixUser, "update", existingEntity, "name");
}