> The cascade functionality of SQLObject seems to not apply to related
> joins. Having to manually cleanup pointers back to deleted records
> seems silly. I've looked through archives for both TG and SQLObject and
> seen a lot of people asking about this funcitonality, but no
> explanation as to how to approximate this functionality. Thoughts?

Just alther the tables that sqlobject automagically creates. I.e. I
have a RelatedJoin between Person and Keyword. Using tg-admin sql sql
I can see that the intermediate table between Person and Keyword that
sqlobject would create looks like this:

CREATE TABLE keyword_person (
keyword_id INT NOT NULL,
person_id INT NOT NULL
);

Then I just alter it to add the foreign key contraints:

alter table keyword_person
add foreign key (keyword_id) references keyword(id) on delete cascade;

alter table keyword_person
add foreign key (person_id) references person(id) on delete cascade;

It's dirt simple.

--
mvh Björn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to