I think I have a similar trouble, although the symptoms are different.
I have a PostgreSQL table named 'acl' mapped as UserGroup.
Table acl
Column| Type
--+-
id | integer
id_operatore | integer
cod_ruolo| text
id_asl | integer
id_azienda
in both of these cases, a particular Column can only be expressed on
the Mapper once. I should add some error checking to Mapper to
insure that this is followed. The reason is simple: if a class has
two attributes a and b which both point to a column C, and I
set a to 5 and b to 7 and
I tried this
class UserGroup(DomainObject):
pass
assign_mapper(context, UserGroup, tbl['acl'],
properties = {
'id_operatore': tbl['acl'].c.id_operatore, 'user_id' : synonym('id_operatore', proxy=True),
'cod_ruolo' :
thanks for testing that for me. added a fix + unit test in rev 2219.
On Jan 19, 2007, at 4:48 PM, jose wrote:
I tried this
class UserGroup(DomainObject):
pass
assign_mapper(context, UserGroup, tbl['acl'],
properties = {
'id_operatore': tbl
Michael Bayer wrote:
to have aliases of properties that are usable with get_by(), use the
synonym function, described in:
http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_properties_overriding
Thank you. Altough the docs are very well done, there are many APIs and
that
to have aliases of properties that are usable with get_by(), use the
synonym function, described in:
http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_properties_overriding
--~--~-~--~~~---~--~~
You received this message because you are