jdcman wrote: > > our members table has an ID as the primary key with an auto-assigned > key ID. > > When we create the class it is instantiated with the ID and also > returns an ID. > > obviously if we provide an ID it conflicts with the auto-generated ID. > and if we don't provide an ID it says we didn't provide enough > variables to instantiate the class > so how do we define our class so that it can return an ID but doesn't > require one to instantiate the class? >
define a constructor for your class which does not require an id....or, don't define a constructor at all. SQLAlchemy has no constructor requirements on mapped classes, that error is being produced by your own application. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---