Hey Stefano, I tried that, but when I did, this is the error I got while inserting a new rating:
InterfaceError: (InterfaceError) Error binding parameter 0 - probably unsupported type. u'SELECT subratings.id AS subratings_id \nFROM subratings \nWHERE subratings.id = ?' (<symbol 'NEVER_SET>,) On Aug 5, 9:46 am, Stefano Fontanelli <[email protected]> wrote: > Il 04/08/11 21.27, Aviv Giladi ha scritto: > > > Hey, > > > Tried adding cascade to Rating's backref call like so: > > > subrating = relationship("SubRating", backref=backref("rating", > > cascade="all, delete-orphan" > > uselist=False)) > > > This unfortunately doesn't work - when I delete a Rating, the > > according Subratings are NOT removed. > > What am I doing wrong? (Testing with SQLite) > > Are you sure about the position of 'cascade' keyword? > I think the right way to do that could be: > > subrating = relationship("SubRating", > cascade="all, delete-orphan", > backref=backref("rating", uselist=False)) > > Regards, > Stefano. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en.
