> -----Original Message----- > From: sqlalchemy@googlegroups.com > [mailto:sqlalch...@googlegroups.com] On Behalf Of Marcin Krol > Sent: 28 May 2009 13:57 > To: sqlalchemy@googlegroups.com > Subject: [sqlalchemy] Re: This join does not fill in the collection > > > Hello Simon, > > This answered my question, thanks! (I don't know how I missed that in > docs..) > > This is theoretically theoretical: > > But suppose I *did* some selection on Hosts and still used > .options(eagerload('hosts')) on query - would that screw smth up? > > In particular, if I called session.commit() later, would that save > Reservations with changed collections? > > Regards, > mk >
I don't know the answer for certain, but I suspect that if you only had a half-loaded collection, you could add and remove items from that collection, and those changes would be reflected in the database, without affecting items that hadn't been loaded. I don't think SA would do the bulk UPDATES or DELETES that would be necessary to affect items that hadn't been loaded. (I also don't know what would happen if you deleted a Reservation with a half-loaded hosts collection. It probably depends on the cascade settings on the relation) Again, these are only guesses. It should be easy enough for you to knock up a test case to find out the answer for sure. Simon --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---