diff --git a/src/main/java/org/caosdb/server/query/Backreference.java b/src/main/java/org/caosdb/server/query/Backreference.java index 987a59d1c54bc00ae046e1cefafaf2fa7731a3dd..e5d73ebaf825693f4dbf9fbe12b7fd794a81e8ec 100644 --- a/src/main/java/org/caosdb/server/query/Backreference.java +++ b/src/main/java/org/caosdb/server/query/Backreference.java @@ -113,7 +113,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface { initBackRef(query); final CallableStatement callApplyBackRef = - getConnection().prepareCall("call applyBackReference(?,?,?,?,?)"); + getConnection().prepareCall("call applyBackReference(?,?,?,?,?,?)"); callApplyBackRef.setString(1, getSourceSet()); // sourceSet this.statistics.put("sourceSet", getSourceSet()); this.statistics.put( @@ -145,6 +145,7 @@ public class Backreference implements EntityFilterInterface, QueryInterface { callApplyBackRef.setNull(4, VARCHAR); } callApplyBackRef.setBoolean(5, hasSubProperty()); // subQuery? + callApplyBackRef.setBoolean(6, this.isVersioned()); executeStmt(query, callApplyBackRef); callApplyBackRef.close(); @@ -210,7 +211,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface { this.statistics.put( "subPropertySourceSetCount", Utils.countTable(query.getConnection(), this.sourceSet)); this.targetSet = null; - getSubProperty().getFilter().apply(this); final long t3 = System.currentTimeMillis(); try (final PreparedStatement callFinishSubProperty = @@ -324,6 +324,6 @@ public class Backreference implements EntityFilterInterface, QueryInterface { @Override public boolean isVersioned() { - return false; + return this.query.isVersioned(); } } diff --git a/src/main/java/org/caosdb/server/query/SubProperty.java b/src/main/java/org/caosdb/server/query/SubProperty.java index 2f2311851ec83ad756bd7482f88976497a218573..9edfe795a56214710e14580138c0f154b37ea3fd 100644 --- a/src/main/java/org/caosdb/server/query/SubProperty.java +++ b/src/main/java/org/caosdb/server/query/SubProperty.java @@ -165,7 +165,11 @@ public class SubProperty implements QueryInterface, EntityFilterInterface { @Override public boolean isVersioned() { - // TODO Auto-generated method stub - return false; + boolean is_versioned = this.query.isVersioned(); + if (is_versioned) { + throw new QueryException( + "Versioned queries are not supported for subqueries yet. Please file a feature request."); + } + return is_versioned; } }