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

2012-01-15 Thread Jackson, Cameron
meron Sent: Monday, 16 January 2012 1:41 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Re: Initialize model by its primary key. Hmm, it's kind of hard to say whether the code you just posted is OK or not, without knowing what those 2 classes represent. It kind of looks to me

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

2012-01-15 Thread Jackson, Cameron
And the view is just calling controller functions and displaying the model to the user. Make sense? -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of gpitel Sent: Monday, 16 January 2012 1:08 PM To: sqlalchemy Subject: [sqlalchemy] Re: In

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

2012-01-15 Thread Michael Bayer
On Jan 15, 2012, at 9:07 PM, gpitel wrote: > What you are saying makes perfect sense. Thank you for showing me the > light. The code below incorporates what I think you were saying and > allows me to still test it easily. Thanks again. A+++ for the > SQLAlchemy community!!! A+++ for Cameron

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

2012-01-15 Thread gpitel
legroups.com [mailto:sqlalchemy@googlegroups.com] On > Behalf Of Jackson, Cameron > Sent: Monday, 16 January 2012 12:45 PM > To: sqlalchemy@googlegroups.com > Subject: RE: [sqlalchemy] Re: Initialize model by its primary key. > > You are correct that an object should initialise itsel

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

2012-01-15 Thread Jackson, Cameron
@googlegroups.com Subject: RE: [sqlalchemy] Re: Initialize model by its primary key. You are correct that an object should initialise itself, but don't take that to mean that Test0 should be responsible for every use case where a Test0 is going to be created. If you need some logic that says

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

2012-01-15 Thread Jackson, Cameron
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of gpitel Sent: Monday, 16 January 2012 12:27 PM To: sqlalchemy Subject: [sqlalchemy] Re: Initialize model by its primary key. Thanks for the quick response. I am not a programmer by tra

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

2012-01-15 Thread gpitel
Thanks for the quick response. I am not a programmer by trade, so your insight is a great help. My program is split up into a model, a view, and a controller. I have been validating my model using unit testing ( from what I have read testing the controller and view is debatable). The reason I hav