improving performance of the getType function, it's not a virtual field

This commit is contained in:
Ben Bosman
2019-11-28 14:16:04 +01:00
parent 0fbe314890
commit 4fda5c1354

View File

@@ -51,7 +51,7 @@ public class EntityServiceImpl implements EntityService {
@Override
public EntityType getType(Context context, Entity entity) throws SQLException {
Item item = entity.getItem();
List<MetadataValue> list = itemService.getMetadata(item, "relationship", "type", null, Item.ANY);
List<MetadataValue> list = itemService.getMetadata(item, "relationship", "type", null, Item.ANY, false);
if (!list.isEmpty()) {
return entityTypeService.findByEntityType(context, list.get(0).getValue());
} else {