Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Kevin Dangoor <dangoor@gm...> - 2005-02-08 13:47:16
I happened to have debug turned on for a connection just now, and I
noticed that if I delete an object with destroySelf(), it does not
remove rows from many-to-many join tables. Should it, or do we rely on
the database engine to cascade deletes as needed?
On Tue, 8 Feb 2005 08:47:08 -0500, Kevin Dangoor <dangoor@...> wrote:
> I happened to have debug turned on for a connection just now, and I
> noticed that if I delete an object with destroySelf(), it does not
> remove rows from many-to-many join tables. Should it, or do we rely on
> the database engine to cascade deletes as needed?
From the docs/news:
"*Col constructors now support cascade: cascade=None (default) means
no constraint; cascade=True means that if the foreign key is deleted,
the object will be deleted; cascade=False means that the delete will
fail; cascade="null" means that the column will be set to NULL. The
constraints are only implemented in the DBMS, not in SQLObject (i.e.,
they will not work in databases like MySQL and SQLite)."
Unfortunately, if you create your tables with SQLObject, RelatedJoin
does not automatically create any constraints, so you should do it