postgres backend and circular relations
Session::createTables() creates constraints at the same time when table is created. Postgres prohibits referencing non-existing tables in constraints. So tables which are referencing each other can not be created.
It is likely that Wt::Dbo One-2-One relation does nt work in Postgres (I have not tried).
SQLite3 does not allow to add constraints to existing tables. So current constraints creating method (as part of the table creation statement) should be used for sqlite. For Postgres (and probably firebird and mysql) constraints should be added after creating all tables.
Updated by Koen Deforche about 8 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
I think it's true that a circular dependency will not work in the createTables() statement, however a One-to-One relation does not create a circular dependency (one of the sides is resolved using a query rather than a stored reference).