On Nov 8, 2010, at 6:36 PM, Hector Blanco wrote:

> methods that I have implemented and that need to be there. That would
> be the "ZepConnector" (and, for purposes of the example, it's method
> foo() it's the one I need to use). As you can see in the following
> lines, I randomly test its availability in the addChild1() method of
> the Parent.
> 
>       child1 = relationship(
>               "Child",
>               uselist=True,
>               primaryjoin=lambda: and_((Parent.id == Child.parent_id), 
> (Child.type
> == "VR")),
>               collection_class=ZepConnector("VR")
>               )

So this is incorrect - collection_class takes a class or other callable as an 
argument that will produce an instance of your collection.  The ZepConnector 
source you have below indicates that ZepConnector("VR") is an instance of the 
collection.   You need to use a lambda: there.   The other errors you're 
getting would appear to extend from that (and is also why __init__ is called on 
ZepConnector - you're calling it yourself).


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

Reply via email to