If you must use sqlite, then google for sqlite cascade - there are C program files that will convert your SQL to sqlite triggers which will accomplish this (according to all that I saw - I have no experience); there is even a website where you can paste your table definition, and it will generate the equivalent sql for sqlite for you.
I think it would be just as easy / easier to install postgres (or something of your choice) and use that. Of course, if you are writing something to run on a mobile device, you may not have any choice; for pretty much everything else, you have choices... On Wed, Aug 12, 2009 at 2:13 PM, Richard <[email protected]> wrote: > > hmm, that's a pity. Thanks for the link. > Is there a single query that could delete all my A's and B's? Or do I > need to iterate through the A's and remove them all manually? > > Richard > > > On Aug 12, 5:52 pm, Yarko Tymciurak <[email protected]> wrote: > > It apprears that sqlite does not support this - seehttp:// > www.sqlite.org/omitted.html > > > > On Wed, Aug 12, 2009 at 2:41 AM, Richard <[email protected]> wrote: > > > > > hello, > > > > > Does sqlite support cascade or am I doing something wrong? > > > > > I have these tables: > > > db.define_table('A', > > > db.Field('B', db.B, ondelete='CASCADE'), > > > ) > > > db.define_table('B', > > > db.Field('name'), > > > ) > > > > > And when I run db(db.A.id > 0).delete(), the B's are still there. > > > > > Richard > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

