steev wrote:
> class Entity:
> pass
> entities_table = Table('domains', metadata, autoload=True)
> assign_mapper(session.context, Entity, entities_table)
>
> Also, it doesn't seem to be necessarily related to autoload after all? -
>
You should inherit Entity from object.
class Entity(object):
Properties only work on new style classes.
> and got
>
> File "/path/to/project/model.py", line 238, in ?
> assign_mapper(session.context, Entity, entities_table)
> File "build/bdist.linux-i686/egg/sqlalchemy/ext/assignmapper.py", line
> 35, in assign_mapper
> File "/usr/lib/python2.4/site-packages/PIL/__init__.py", line 56, in
> mapper
>
> File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 130,
> in __init__
> sqlalchemy.exceptions.ArgumentError: Class 'Entity' is not a new-style class
>
QED
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---