On Sep 10, 2006, at 7:03 PM, Rick Morrison wrote:
> issue by simply disallowing multiple identity columns in a single > table. I thought that multiple identity columns in a single table > would be a pretty rare occurrence. Maybe I was wrong on that count. > At any rate, the prohibition of multiple identity columns is a most > probably somewhat artificial constraint that was added to prevent > the above scenario, not an intrinsic limitation of SA or the MSSQL > module. > oh ok, just disregard my previous email about ms-sql not allowing composite primary keys... > MSSQL instead is modal -- there is a connection-wide "SET > IDENTITY_INSERT ON/OFF" setting that controls whether or not insert > statements will generate new identity values or not. This means > that the above scenario can never work, and either all values must > be specified, or none. This is kind of out of step with the SA > paradigm, so when I first wrote the MSSQL module, I just side- > stepped the whole So, if i SET IDENTITY_INSERT ON and then try to insert an explicit value into the PK column, it throws an error ? thats a little weird. OK, well the MS-SQL dialect then should just have a keyword argument for this setting, and we just set it on the connections. i think the rest of SA wouldnt have to be affected, it would just mean that the calling application would have to know whether or not explicit identity values are allowed or not. (that is assuming theres no other decent way to generate primary key values...) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users