Skip to content
Snippets Groups Projects
Commit f4b6f63d authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

correctly named unique constraint

parent e18a25c3
No related branches found
No related tags found
2 merge requests!836Resolve "Implement Spring Security",!613WIP: New Minerva Security Layer
......@@ -6,7 +6,7 @@ import java.util.Objects;
import javax.persistence.*;
@Entity
@Table(uniqueConstraints = @UniqueConstraint(columnNames = { "type", "object_id" }))
@Table(uniqueConstraints = @UniqueConstraint(columnNames = { "type", "objectId" }))
public class Privilege implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -18,7 +18,7 @@ public class Privilege implements Serializable {
@Enumerated(EnumType.STRING)
private PrivilegeType type;
private Integer objectId = -1;
private Integer objectId;
public Privilege() {
}
......@@ -60,7 +60,7 @@ public class Privilege implements Serializable {
}
public boolean isObjectPrivilege() {
return objectId != -1;
return objectId != null;
}
public Integer getId() {
......
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