On Sun, Oct 25, 2009 at 20:31, Nick Retallack <[email protected]> wrote:

>>>> class Haver(Entity):
> ...   all_belongings = OneToMany('Belonger')
> ...   some_belongings = OneToMany('Belonger', filter='Belonger.stuff !
> = None')

use:

some_belongings = OneToMany('Belonger', filter=lambda c: c.stuff != None)

When you are stuck like this, it usually helps to look at the tests of
Elixir, which also serve as examples. I know that more visible
examples would be nicer, but I just don't have time for that. In your
case, see:

http://elixir.ematia.de/trac/browser/elixir/tags/0.7.0/tests/test_o2m.py#L127

-- 
Gaëtan de Menten
http://openhex.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to