On Friday 07 September 2007 13:54:03 Jean-Philippe Dutreve wrote:
> I was using SA 0.3.9 to insert an item in an ordered list with
> bisect method insort (py 2.5):
>
>     mapper(Entry, table_entries)
>     mapper(Account, table_accounts, properties = dict(
>         entries = relation(Entry, lazy=True,
> backref=backref('account', lazy=False),
>             collection_class=ordering_list('position'),
>             order_by=[table_entries.c.position])
>     ))
>     bisect.insort(account.entries, an_entry)
>
> This is not working anymore with SA 0.4 beta5 : the list owns the
> item but not the other way.
>      assert account.entries[0] is an_entry  # TRUE
>      assert an_entry.account is account  # FALSE, currently is None
>
> Remark: it's working if I copy/paste the bisect method in my
> module.
>
collections were reworked in 0.4, so see what methods the insort() 
uses from your list, and see if they are simulated/wrapped in 
orm.collections.py. maybe there some unhooked one.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to