On Dec 19, 2008, at 2:11 PM, Arn Vollebregt wrote:
>
> Hi,
>
> I am wondering if there is a way to completely decouple the
> association proxy declaration from my Python classes, and contain this
> to a database class? My goal is not to 'burden' developers looking at
> the main part of my code with SQLAlchemy when there is no need to
> directly interact with the database. This in order to heighten the
> readability/extendability of my code. All the examples I have seen
> thus far declare the association proxy directly within the class
> definition, which I would like to avoid.
easy enough:
mapper(MyClass, mytable, properties={...})
MyClass.some_association = assocation_proxy(*args)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---