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

2007-05-07 Thread ml
That's it, thanks! Michael Bayer napsal(a): On May 4, 2007, at 9:17 AM, ml wrote: 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), )

[sqlalchemy] Re: Multiple tables forming one class?

2007-05-07 Thread Gaetan de Menten
And btw, in case I didn't understand what you wanted and you really wanted to map one class to several tables, you'll find information about that there: http://www.sqlalchemy.org/docs/adv_datamapping.html#advdatamapping_joins On 5/7/07, Gaetan de Menten [EMAIL PROTECTED] wrote: On 5/7/07,

[sqlalchemy] Determining class of ORM attribute at run-time

2007-05-07 Thread Cory Johns
I'm creating a general routine that is intended to take an arbitrary dict of attribute / value pairs and an ORM object instance, and use the dict to update the properties of the ORM instance, without knowing a priori whether the attributes might be relations to other tables. The problem I ran in

[sqlalchemy] SQLError: ... invalid identifier

2007-05-07 Thread shday
I am getting a new error when using r2607. When I switch back to 3.6 there is no error. Here is the stack trace: Page handler: bound method StudyRequestController.default of srt.controllers.StudyRequestController instance at 0x015D6620 Traceback (most recent call last): File

[sqlalchemy] Re: SQLError: ... invalid identifier

2007-05-07 Thread Michael Bayer
yeah also whats your mapper on that ? is there a string-based order_by in there somewhere (or in the query.selectfirst() call) ? i dont understand why that name wouldnt be truncated. On May 7, 2007, at 3:09 PM, shday wrote: The table is reflected here: study_request_table =

[sqlalchemy] Re: SQLError: ... invalid identifier

2007-05-07 Thread Michael Bayer
also is there a count() stuck in there somewhere ? the tbl_row_count identifier only comes into play when theres count(). On May 7, 2007, at 3:09 PM, shday wrote: The table is reflected here: study_request_table = Table('study_request',metadata,

[sqlalchemy] Re: SQLError: ... invalid identifier

2007-05-07 Thread shday
The mapper: mapper(StudyRequest,study_request_table,properties={'model':relation(Model, primaryjoin=model_table.c.model_id==study_request_table.c.model_id, foreign_keys=[study_request_table.c.model_id], lazy=False), #backref doesn't work in 3.6

[sqlalchemy] Re: SQLError: ... invalid identifier

2007-05-07 Thread shday
No count() anywhere. On May 7, 3:17 pm, Michael Bayer [EMAIL PROTECTED] wrote: also is there a count() stuck in there somewhere ? the tbl_row_count identifier only comes into play when theres count(). On May 7, 2007, at 3:09 PM, shday wrote: The table is reflected here:

[sqlalchemy] Re: SQLError: ... invalid identifier

2007-05-07 Thread Michael Bayer
k i got it, rev 2609. On May 7, 2007, at 3:44 PM, shday wrote: The mapper: mapper(StudyRequest,study_request_table,properties={'model':relation (Model, primaryjoin=model_table.c.model_id==study_request_table.c.model_id, foreign_keys=[study_request_table.c.model_id],