[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-03 Thread Iain Duncan
On Sun, 2009-05-03 at 09:43 -0400, Michael Bayer wrote: > > > On May 2, 2009, at 8:16 PM, Iain Duncan wrote: > > > > > On Sat, 2009-05-02 at 09:41 -0400, Michael Bayer wrote: > >> > >> you'd set cascade="all, delete-orphan" on the Purchase.registration > >> side (in this case its your backref).

[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-03 Thread Michael Bayer
On May 2, 2009, at 8:16 PM, Iain Duncan wrote: > > On Sat, 2009-05-02 at 09:41 -0400, Michael Bayer wrote: >> >> you'd set cascade="all, delete-orphan" on the Purchase.registration >> side (in this case its your backref). > > Thanks Mike. So what is the recommended way of creating the attached >

[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-02 Thread Iain Duncan
On Sat, 2009-05-02 at 09:41 -0400, Michael Bayer wrote: > > you'd set cascade="all, delete-orphan" on the Purchase.registration > side (in this case its your backref). Thanks Mike. So what is the recommended way of creating the attached item though, or is it supposed to happen automatically fr

[sqlalchemy] Re: auto-creating one-to-one relations with the orm?

2009-05-02 Thread Michael Bayer
you'd set cascade="all, delete-orphan" on the Purchase.registration side (in this case its your backref). On May 2, 2009, at 1:42 AM, Iain Duncan wrote: > > Hi all, I have a mapper that looks like this: > > mapper( Registration, registration_table, properties={ >'purchase': relation(Purch