Martin Kaffanke wr9te:
> This should normally be done, that all other properties are still there.
> 
> Try to make an example script where you have problems, which we can run
> if you have troubles here.

You're right. What confused me is that when you do

mapper(User, pg_user, properties={
    'user_name': pg_user.c.usename})

Then the usename column is missing, all the *other* columns are still
there. I had expected that if properties are added, then this would add
user_name as an *alias* for usename.

This feature probably needs better documentation.

Now I start to understand what the synonym function is for:

mapper(User, pg_user, properties={
    'user_name': pg_user.c.usename,
    'usename' : synonym('user_name')})

However, this results in the following error:

NameError: global name 'SynonymProperty' is not defined

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sqlalchemy
-~----------~----~----~----~------~----~------~--~---

Reply via email to