You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make:model writes the relations from the foreign keys that Phalcon describeReferences() gives. On SQLite, two kinds of key do not give a correct relation:
A composite key: SQLite gives one reference for each column of the key. Each column gives its own relation, and each relation uses only part of the key. The docs say that crest does not support SQLite composite keys.
A key with no referenced columns: SQLite accepts REFERENCES customers with no column. crest skips the relation with the reason the key does not name the referenced columns.
Scope
On SQLite, a composite key gives one relation with all its columns.
On SQLite, a key with no referenced columns gives a relation to the primary key of the referenced table.
Database tests. On cphalcon before 5.24.0, they skip, as skipCompositeKeyOnOldCphalcon() does.
Docs: the two SQLite limits name the versions (before cphalcon 5.24.0 and before phalcon/phalcon 6.0.0).
Depends on (decided by the owner, 2026-11-27: the fix is in Phalcon)
Activity
[#87] - updating phalcon/phalcon for the describeReferences fixes
[#87] - naming the Phalcon versions in the comments on the SQLite keys
[#87] - adding tests for the SQLite composite keys and the keys with …
[#87] - updating docs and changelog
niden commentedon Nov 27, 2026
Resolved in #106