Re: [sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-21 Thread Michael Bayer
On May 21, 2010, at 9:21 AM, Michael Bayer wrote: > > On May 21, 2010, at 9:12 AM, Michael Bayer wrote: > >> >> On May 21, 2010, at 2:11 AM, Yang Zhang wrote: >> >>> >>> It would be nice if this restriction could be lifted if explicitly >>> requested somehow (__use_pk__ = False, and have tho

Re: [sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-21 Thread Michael Bayer
On May 21, 2010, at 9:12 AM, Michael Bayer wrote: > > On May 21, 2010, at 2:11 AM, Yang Zhang wrote: > >> >> It would be nice if this restriction could be lifted if explicitly >> requested somehow (__use_pk__ = False, and have those operations raise >> run-time exceptions if attempted). (As fo

Re: [sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-21 Thread Michael Bayer
On May 21, 2010, at 2:11 AM, Yang Zhang wrote: > > It would be nice if this restriction could be lifted if explicitly > requested somehow (__use_pk__ = False, and have those operations raise > run-time exceptions if attempted). (As for why I'm using the ORM, it's > basically because it affords m

Re: [sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-20 Thread Yang Zhang
On Thu, May 20, 2010 at 8:09 PM, Michael Bayer wrote: > > On May 20, 2010, at 5:51 PM, Yang Zhang wrote: > >> How do I create an ORM type with no primary key columns? For some >> reason I'm getting: >> >>  sqlalchemy.exc.ArgumentError: Mapper >> Mapper|ActorActivity|actor_activities could not asse

Re: [sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-20 Thread Michael Bayer
On May 20, 2010, at 5:51 PM, Yang Zhang wrote: > How do I create an ORM type with no primary key columns? For some > reason I'm getting: > > sqlalchemy.exc.ArgumentError: Mapper > Mapper|ActorActivity|actor_activities could not assemble any primary > key columns for mapped table 'actor_activiti

[sqlalchemy] could not assemble any primary key columns for mapped table '...'

2010-05-20 Thread Yang Zhang
How do I create an ORM type with no primary key columns? For some reason I'm getting: sqlalchemy.exc.ArgumentError: Mapper Mapper|ActorActivity|actor_activities could not assemble any primary key columns for mapped table 'actor_activities' for: class ActorActivity(Base): __tablename__ = 'act

[sqlalchemy] Could not assemble any primary key columns for mapped table

2007-05-04 Thread ml
Hi! I have a few tables with non-integer primary keys. Following raises an exception: meta = MetaData(name="somemeta") themes = table("themes", meta, Column("title", Unicode(30), primary_key=True), ) class Theme(object): pass mapper(Theme, themes).compile() File "src/libs/sqlalchemy/orm

[sqlalchemy] Could not assemble any primary key columns for mapped table error for views

2007-04-23 Thread Andreas Jung
I have a view arbeitsmittelhierarchy_arbeitsmittle_view which is defined as a left join of two tables. Trying to generate a mapper from the autoload view as Table() fails: File "build/bdist.linux-i686/egg/sqlalchemy/orm/session.py", line 277, in query File "build/bdist.linux-i686/egg/sqlalch