Skip to content

Commit

Permalink
fix issue opensourceBIM#1278 - query with property condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zaqifathis authored and hlg committed Oct 10, 2024
1 parent 59506ba commit 0c7e370
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ record = typeRecordIterator.next();
if (currentObject != null) {
DatabaseSession databaseSession = getQueryObjectProvider().getDatabaseSession();
List<Long> isDefinedByOids = (List<Long>) currentObject.get("IsDefinedBy");
Set<String> propertyKeysMatched = new HashSet<>();
int totalQueryProperties = 0;
for (String key : this.properties.keySet()) {
totalQueryProperties += this.properties.get(key).count();
}
if (isDefinedByOids != null) {
Set<String> propertyKeysMatched = new HashSet<>();
for (Long definedByOid : isDefinedByOids) {
EClass eClass = databaseSession.getEClassForOid(definedByOid);
if (getPackageMetaData().getEClass("IfcRelDefinesByProperties").isSuperTypeOf(eClass)) {
Expand All @@ -134,10 +134,10 @@ record = typeRecordIterator.next();
LOGGER.info(eClass.getName());
}
}
if (propertyKeysMatched.size() != totalQueryProperties) {
// All properties should have matched, atm all properties provided in the query are evaluated as AND
currentObject = null;
}
}
if (propertyKeysMatched.size() != totalQueryProperties) {
// All properties should have matched, atm all properties provided in the query are evaluated as AND
currentObject = null;
}
}

Expand Down

0 comments on commit 0c7e370

Please sign in to comment.