[orm-devel] orm/dbclass.py typo and a question on one2many deletions

Diedrich Vorberg orm-devel@mailman.tux4web.de
Wed, 8 Jan 2003 10:38:25 +0100


>             seld._data[name] = self.columns[name].column()
>---------------^
>should be   self._data[name] = self.columns[name].column()
Thank you for this one...

>Also, I'm having some trouble figuring out how to deal with a one2many 
>relationship.  I've got:
> >>> invoice.invoice_line_items[0].delete()

This one should read

   del invoice.invoice_line_items[0]

I have to admin that one2manyList's __delslice__ method was not 
tested at all and that there was no __delitem__ method. I've added 
these and did some rudimentary testing. Check out the latest CVS!

BTW: I'm going to write the many2manyList __del*__ methods some time
soon, they should be available shortly.

>Thanks!  I hope you all had a pleasant holiday season.
Thanks! Best wishes for the new year to everyone on the list!!

Diedrich
-- 
           _..._                            Diedrich Vorberg
         .'     '.
        /  _   _  \                         http://www.tux4web.de
        | (o)_(o) |                         info@tux4web.de
         \(     ) /            .---.
         //'._.'\ \           /     \       Internet Dienstleistungen
        //   .   \ \          \.@-@./       und 'Consulting'.
       ||   .     \ \         /`\_/`\
       |\   :     / |        //  _  \\      Linux Rules!
       \ `) '   (`  /_      | \     )|_
     _)``".____,.'"` (_    /`\_`>  <_/ \
     )     )'--'(     (    \__/'---'\__/
      '---`      `---`