Hi Nick. Try FieldRule.delete(rule) instead of del rule and Field.delete(field) instead of del field.
Hope this helps. -- Best regards Leandro Lameiro Blog: http://lameiro.wordpress.com On 8/2/07, Nick Murdoch <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm migrating from SQLObject so I apologise if this is a really dumb > question, but I can't work out how to delete objects. I'm using Elixir > as part of a new TurboGears project I'm working on. > > I have a set of Field objects along the lines of > > class Field(Entity): > has_field('name', String(), required=True) > belongs_to('database', of_kind='Database') > has_many('rules', of_kind='FieldRule') > > In my code, I'm trying to delete all the Fields of a particular > Database, something like: > > for field in database.fields: > for rule in field.rules: > del rule > del field > > I've tried 'del field' and 'field.delete()' but neither seem to have > an effect, either immediately in pdb, or after the controller > completes. > > Help here would be great! > > Thanks, > > Nick Murdoch > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
