[sqlalchemy] Re: Can child-side of a one-to-many create the parent side?

2009-08-14 Thread Michael Bayer
Gregg Lind wrote: I have a many-to-one relation, let's say between Address and User, both created using Declarative. I would like it that if an Address references a User, it will create that User, if it doesn't exist. Otherwise, it should use the existing one. There should be no addresses

[sqlalchemy] Re: Can child-side of a one-to-many create the parent side?

2009-08-14 Thread Gregg Lind
One quick follow up. re: question 2: If I create a User there, and that user exists in the DB, won't that cause problems? I ask because this situation seems analogous to a create if not existing situation. Thanks for the (as ever) fast response. GL On Fri, Aug 14, 2009 at 5:20 PM, Michael

[sqlalchemy] Re: Can child-side of a one-to-many create the parent side?

2009-08-14 Thread Michael Bayer
Gregg Lind wrote: One quick follow up. re: question 2: If I create a User there, and that user exists in the DB, won't that cause problems? I ask because this situation seems analogous to a create if not existing situation. well sure if your Address implies a particular User that might