I agree this is strange. I do not know. web2py does not do anything other than send the SQL to the database as you would from command line.
The only "special" feature is the implementation of ondelete cascade for mysql. You can how it is done manually in the delete(self) method in gluon/sql.py. Massimo On Nov 19, 6:18 am, Frederik Wagner <[email protected]> wrote: > Hi, > > it might be that I'm missing something, but:t > In a table definition I'm using a foreign key reference with the > ondelete='RESTRICT'. Following the sql.log and the Table schemes on > the DB, this is correctly used in the CREATE TABLE statements > . > When I'm inserting some data with references and then delete the > referenced data set (let's say a Table 'domain' and a 'host' which has > a reference to 'domain', then deleting a 'domain' entry)., I do not > get errors through web2py complaining that there are references left: > > 1. using SQLlite: web2py and on sqlite interface the referenced entry > is deleted without complaint. > 2. using MySQL: web2py does delete the entry, but the cmdline of MySQL > gives an error as expected. > > So how can web2py override the MySQL database constrain of ON DELETE RESTRICT? > For SQLlite is suppose it is just a missing feature in SQLlite... > > Thanks for help, > Frederik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

