Entity conforms to schema if it has all required properties, not just some

This commit is contained in:
Lentil Hoffman 2025-06-15 12:06:14 -05:00
parent ada27ff1b0
commit 91514289ae
Signed by: lentil
GPG Key ID: 0F5B99F3F4D0C087

View File

@ -124,12 +124,12 @@ export class QueryEngine {
const entity = this.lossless.domainEntities.get(entityId);
if (!entity) continue;
// Check if entity has deltas for any required property
const hasRequiredProperty = requiredProperties.some(propertyId =>
// Check if entity has deltas for all required property
const hasRequiredProperties = requiredProperties.every(propertyId =>
entity.properties.has(propertyId)
);
if (hasRequiredProperty) {
if (hasRequiredProperties) {
candidateEntities.push(entityId);
}
}