On Jul 23, 2011, at 5:37 AM, Moch Ramis wrote: > expunge() will remove any object from the Session > > This look a little dumb, but it seems this will solve my problem: expunged > objects will not be expired by the session anymore and their data will still > be accessible don't they? (I'm not certaint about the last point)...
keeping in mind that its been 102 degrees here and I only have a vague understanding of your issue, it seems like you're looking to get part of the expire-on-rollback behavior, just not for everything. So if you were to use expunge() and expire() directly, you might be able to achieve a similar effect. expunge() would be for those objects that failed to get INSERTed and expire() for persistent objects whose state has become stale. > > I understand the problem. I think that letting the objects in the session may > have been the problem as i did not needed them to be actualized. so maybe splitting out these particular INSERTS into ad-hoc Session.execute() calls, which don't rollback or do anything when they fail except raise. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
