On 02/07/11 13:43 +0200, Paul J Stevens wrote: > I noticed that the sqlite driver does not use or enforce foreign key > constraints. > > Is there reason for that?
Yes SQLite doesn't support foreign keys. > If not enforced in the database, how are > cleanups handled? Is that done in the user-code? It is managed by ModelSQL for evey database engine (see [1]). It is done like that to allow the Model Access and Record Rules working on the delete "cascade" or "set null". [1] http://hg.tryton.org/trytond/file/a7fedb291bb4/trytond/model/modelsql.py#l1008 -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgp8GzjTAqXvm.pgp
Description: PGP signature
