RE: [sqlalchemy] Initialize model by its primary key.

2012-01-15 Thread Jackson, Cameron
ilto:sqlalchemy@googlegroups.com] On Behalf Of gpitel Sent: Sunday, 15 January 2012 11:46 PM To: sqlalchemy Subject: [sqlalchemy] Initialize model by its primary key. I am trying to setup my model initialization in two different ways. 1.) Initialize normally by creating an instance, e.g., test0=T

Re: [sqlalchemy] Initialize model by its primary key.

2012-01-15 Thread Michael Bayer
On Jan 15, 2012, at 7:46 AM, gpitel wrote: > I am trying to setup my model initialization in two different ways. > 1.) Initialize normally by creating an instance, e.g., > test0=Test0('Title') > 2.) Initialize by query, using an input integer as the primary key, > e.g., test0=Test(32) > > This p

[sqlalchemy] Initialize model by its primary key.

2012-01-15 Thread gpitel
I am trying to setup my model initialization in two different ways. 1.) Initialize normally by creating an instance, e.g., test0=Test0('Title') 2.) Initialize by query, using an input integer as the primary key, e.g., test0=Test(32) This posses two questions. Is it common practice to put a sessio