I don't think it's portable accross different rdbms. One can use raw sql as a last resort, if there are many Matches in this situation.
On Thu, Jul 11, 2013 at 10:42 AM, Niphlod <niph...@gmail.com> wrote: > there's no support for deleting records that are a result of a join. > However, if you are NOT using the devious mysql, you can delete a subselect. > > db(db.whatever.field.belongs(yourquery_withjoins._select()).delete() > > Il giorno giovedì 11 luglio 2013 14:17:46 UTC+2, Jurgis Pralgauskis ha > scritto: >> >> db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ == >> db.Matches.id) & (db.Matches.started == None) ).delete() >> >> gives: >> >> raise RuntimeError("Too many tables selected") >> >> any hints? >> >> >> http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update >> I don't find examples for similar cases >> >> I could select first , and then loop deleting records of needed table ... >> but would be not very efficiet > > -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.