Hey All,

I was upgrading our app from 0.4.1 to 0.4.5 and this code broke:

pg_user = Table('pg_user', metadata,
        Column('usesysid', Integer, primary_key=True),
        Column('usename', Unicode(), unique=True))

pg_group = Table('pg_group', metadata,
        Column('grosysid', Integer, primary_key=True),
        Column('groname', Unicode(), unique=True),
        Column('grolist', PGArray(unicode)))

mapper(PGUser, pg_user, properties={
        'groups': relation(PGGroup, viewonly=True,
                primaryjoin=pg_user.c.usesysid==func.any(pg_group.c.grolist),
                foreign_keys=[pg_group.c.grolist])})

"Specify the foreign_keys argument to indicate which columns on the
relation are foreign." % (self.primaryjoin, self))
ArgumentError: Could not determine relation direction for primaryjoin
condition 'pg_user.usesysid = any(pg_group.grolist)', on relation
PGUser.groups (PGGroup). Specify the foreign_keys argument to indicate
which columns on the relation are foreign.

I found this post(1) so I tried upgrading to SVN, but I still got the
error. Does it have to do anything with the any() function and the
PGArray column type?

Koen

(1)
http://groups.google.com/group/sqlalchemy/browse_thread/thread/f8e5b5fa07ed9ab9/749beae25624c2f8?lnk=gst&q=foreign_keys#749beae25624c2f8


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to