diff --git a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/DatabaseUtils.java b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/DatabaseUtils.java index f7d364ae6376524ef892de3353d699547417717e..c87ef79ac858bf8dec81176aa1131f32f4055795 100644 --- a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/DatabaseUtils.java +++ b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/DatabaseUtils.java @@ -152,7 +152,8 @@ public class DatabaseUtils { public static void parseOverrides(final List<ProtoProperty> properties, final ResultSet rs) throws SQLException { while (rs.next()) { - final int property_id = rs.getInt("property_id"); + int property_id = rs.getInt("property_id"); + if (rs.wasNull()) property_id = rs.getInt("InternalPropertyID"); for (final FlatProperty p : properties) { if (p.id == property_id) { final String name = bytes2UTF8(rs.getBytes("name_override")); @@ -181,6 +182,9 @@ public class DatabaseUtils { while (rs.next()) { ProtoProperty pp = new ProtoProperty(); pp.id = rs.getInt("PropertyID"); + if (rs.wasNull()) { + pp.id = rs.getInt("InternalPropertyID"); + } pp.value = bytes2UTF8(rs.getBytes("PropertyValue")); pp.status = bytes2UTF8(rs.getBytes("PropertyStatus")); pp.idx = rs.getInt("PropertyIndex"); diff --git a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLGetChildren.java b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLGetChildren.java index 3c1cebf1e20a720a5f726e378bb22b1ad61c850a..649639415184e65129957c065246743a5e963dee 100644 --- a/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLGetChildren.java +++ b/src/main/java/org/caosdb/server/database/backend/implementation/MySQL/MySQLGetChildren.java @@ -37,8 +37,7 @@ public class MySQLGetChildren extends MySQLTransaction implements GetChildrenImp super(access); } - public static final String STMT_GET_CHILDREN = - "Select child from isa_cache where parent=? and rpath=child"; + public static final String STMT_GET_CHILDREN = "call retrieveChildren(?)"; @Override public List<EntityID> execute(final EntityID entity) throws TransactionException { diff --git a/src/main/java/org/caosdb/server/entity/Role.java b/src/main/java/org/caosdb/server/entity/Role.java index f86158a99be307867c17f136a26e1097e6e7bc5f..a2a97f92546b2e63bac61ff059eeb6128d8bab6b 100644 --- a/src/main/java/org/caosdb/server/entity/Role.java +++ b/src/main/java/org/caosdb/server/entity/Role.java @@ -32,7 +32,6 @@ import org.caosdb.server.entity.xml.ToElementStrategy; public enum Role { RecordType, Record, - Domain, File, Property, DataType,