Entity conforms to schema if it has all required properties, not just some
This commit is contained in:
parent
ada27ff1b0
commit
91514289ae
@ -124,12 +124,12 @@ export class QueryEngine {
|
|||||||
const entity = this.lossless.domainEntities.get(entityId);
|
const entity = this.lossless.domainEntities.get(entityId);
|
||||||
if (!entity) continue;
|
if (!entity) continue;
|
||||||
|
|
||||||
// Check if entity has deltas for any required property
|
// Check if entity has deltas for all required property
|
||||||
const hasRequiredProperty = requiredProperties.some(propertyId =>
|
const hasRequiredProperties = requiredProperties.every(propertyId =>
|
||||||
entity.properties.has(propertyId)
|
entity.properties.has(propertyId)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (hasRequiredProperty) {
|
if (hasRequiredProperties) {
|
||||||
candidateEntities.push(entityId);
|
candidateEntities.push(entityId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user