Skip to content
Snippets Groups Projects
Commit c633ae29 authored by Adam Laskowski's avatar Adam Laskowski
Browse files

BIS-1034: Fixed Core UI failing when removal of property type is happening

parent 9f128343
No related branches found
No related tags found
No related merge requests found
......@@ -549,11 +549,15 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty
assert propertyTypeCode != null : "Unspecified property type.";
String query =
String.format("SELECT count(pv) FROM %s pa join pa.propertyValues pv "
+ "WHERE pa.propertyTypeInternal.simpleCode = ? "
+ "AND pa.entityTypeInternal.code = ?",
String.format("SELECT count(pv.id) FROM %s pa join %s pv "
+ " ON pa.id = pv.entityTypePropertyType.id "
+ " WHERE pa.propertyTypeInternal.simpleCode = ? "
+ " AND pa.entityTypeInternal.code = ?",
entityKind
.getEntityTypePropertyTypeAssignmentClass().getSimpleName());
.getEntityTypePropertyTypeAssignmentClass().getSimpleName(),
entityKind.getEntityPropertyClass().getSimpleName()
);
return ((Long) (getHibernateTemplate().find(query,
toArray(propertyTypeCode, entityTypeCode)).get(0))).intValue();
}
......
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