Skip to content

Support scalar and shared containment in recursive dependency queries - #2

Open
deem0n wants to merge 1 commit into
developmentfrom
fix/scalar-containment-navigation
Open

deem0n wants to merge 1 commit into
developmentfrom
fix/scalar-containment-navigation

Conversation

@deem0n

@deem0n deem0n commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

Recursive association queries assumed every containment accessor returned a collection. A SQL view's scalar sqlQuery therefore raised Instances of FmxSQLSelectQuery are not indexable, including when querying an enclosing schema.

Traversal now uses the existing containedEntitiesDo: protocol, which handles scalar, collection and absent children. An identity-based visited set is reset for each query execution and prevents duplicate traversal of shared children and infinite traversal of cycles. Boolean dependency queries use the same traversal contract. Local-only queries still inspect only their receiver.

Three new tests use the real containment trait and isolate traversal from association filtering. They cover scalar/nil children, collection/shared/cyclic containment, local-only behavior, and repeated boolean execution. There is no dependency on the SQL metamodel in the upstream package.

Validation in an isolated Pharo 13 / Moose 13 image: 71 upstream query tests passed, plus 1 actual FAMIX SQL view-to-table fixture passed. The SQL fixture verifies association collection, provider direction, incoming clients, and recursive versus local existence queries. git diff --check passed.

Addresses deem0n/FAMIXNGSQL#13. The full SQL DSM/Butterfly acceptance matrix remains part of the integrated v3.0.0 gate. This PR targets the deem0n fork first.

Updated CI evidence

Full fork CI test job passed: https://github.com/deem0n/Famix/actions/runs/35524462186. Combined SQL qualification is tracked in deem0n/FAMIXNGSQL#32. Release acceptance stays open until reviews and final integrated checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant