MIFOSX-291: fix creation of office. problem with jpa nullable=false being wrong.
This commit is contained in:
+4
-4
@@ -45,7 +45,7 @@ public class Office extends AbstractPersistable<Long> {
|
||||
@Column(name = "name", nullable = false, length = 100)
|
||||
private String name;
|
||||
|
||||
@Column(name = "hierarchy", nullable = false, length = 50)
|
||||
@Column(name = "hierarchy", nullable = true, length = 50)
|
||||
private String hierarchy;
|
||||
|
||||
@Column(name = "opening_date", nullable = false)
|
||||
@@ -172,7 +172,7 @@ public class Office extends AbstractPersistable<Long> {
|
||||
}
|
||||
}
|
||||
|
||||
private String hierarchyOf(Long id) {
|
||||
private String hierarchyOf(final Long id) {
|
||||
return this.hierarchy + id.toString() + ".";
|
||||
}
|
||||
|
||||
@@ -192,11 +192,11 @@ public class Office extends AbstractPersistable<Long> {
|
||||
return isParent;
|
||||
}
|
||||
|
||||
public boolean doesNotHaveAnOfficeInHierarchyWithId(Long officeId) {
|
||||
public boolean doesNotHaveAnOfficeInHierarchyWithId(final Long officeId) {
|
||||
return !this.hasAnOfficeInHierarchyWithId(officeId);
|
||||
}
|
||||
|
||||
private boolean hasAnOfficeInHierarchyWithId(Long officeId) {
|
||||
private boolean hasAnOfficeInHierarchyWithId(final Long officeId) {
|
||||
|
||||
boolean match = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user