Hi Pystar, I think the ondelete='CASCADE' should be in the referencing table:
db.define_table("Pet", SQLField("pet_name', "string", lentgth=32, default=None, required=True), SQLField("pet_owner", db.Person, requires=IS_IN_DB(db, "Person.id", "Person.name"), ondelete='CASCADE')) In SQL this would read like: CONSTRAINT pet_person_fkey FOREIGN KEY (pet_owner) REFERENCES person (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE I hope this solved your problem. Annet --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---