here are my mappers in case that helps, maybe I don't understand the
cascading properly?


# relations for the bookings
mapper(  Booking, booking_table, properties={
        'client': relation( Client ),
        'institution': relation( Institution, ),
        'category': relation( Category ),
        'staff_associations': relation(BookingStaffAssoc, lazy=False, 
            cascade='all, delete-orphan',
order_by=booking_staff_table.c.ordering )
    })

# Association mapper, this is the important part!
mapper(  BookingStaffAssoc, booking_staff_table,
  primary_key=[ booking_staff_table.c.booking_id,
booking_staff_table.c.staff_id],
  properties={ 
    'booking' : relation(Booking, lazy=False, cascade='all,
delete-orphan' ), 
    'staff': relation(Staff, lazy=False, cascade='all, delete-orphan') 
    })


Thanks!



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to