Hi,

is it possible to merge an object back to session, but without merging
the entire tree of related objects. Just this one root object.

I'm trying to implement caching for my user identity framework and I
don't want to merge back the entire tree of objects reachable from the
user entity.

I created a new user instance and copied all relevant attributes to
it. I then tried to merge this copy back to session, but it doesn't
work because you can only merge detached objects not transient ones (I
started playing with internal state to make it appear as detached but
I was not confident in what I was doing).

I then tried removing related objects but I'm not even sure how to do
that. Anyway, the problem here is that you can't merge dirty objects.

If there is no way to merge without merging related objects, I would
be more than happy to know how to create a copy of my user object
which is merge-able. Any workaround will do.

My version of sqlalchemy is 0.4.4

Thanks,
Tvrtko
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to