[sqlalchemy] Automatically create secondary tables for many to many relationship?

2013-09-22 Thread jpeck
Given the arbitrary example below, I can't ever recall actually using the FooKeyword association table other than to set up mappings. I came up with a brute force method to generate the secondary table for me automatically, and I'm hoping someone can show me a better way to do this. My goal

[sqlalchemy] How to map to read only descriptor

2010-06-11 Thread jpeck
I am trying to map to a simple read only property. According to the docs, I *think* I am supposed to use synonym. The problem is that I am getting a None value for the mapped descriptor's column. For example: import datetime from sqlalchemy import Column, Table, Integer, String, MetaData,

[sqlalchemy] Re: How to map to read only descriptor

2010-06-11 Thread jpeck
On Jun 11, 10:13 am, Michael Bayer mike...@zzzcomputing.com wrote: On Jun 11, 2010, at 5:16 AM, jpeck wrote: I am trying to map to a simple read only property. According to the docs, I *think* I am supposed to use synonym. The problem is that I am getting a None value for the mapped

[sqlalchemy] Re: 0.6 Beta 3: specifying bindparams in update()

2010-04-12 Thread jpeck
Michael - Thank you so much for the explanation. Rereading this error message now makes perfect sense and this is a really good change. Also - thanks for the explanation about implicit vs explicit bindparams. I am embarrassed to admit that I actually did not know this, and I use the expression

[sqlalchemy] Re: in_() with composite primary key

2010-01-25 Thread jpeck
On Jan 25, 3:08 pm, Michael Bayer mike...@zzzcomputing.com wrote: jpeck wrote: Depending on your database, you may have a function-style row constructor that does what you want. For example, PostgreSQL treats (a, b) and ROW(a, b) as equivalent. If this works for you, then I think you