Tvrtko wrote:
>
>>
>> transient objects can be merged.  They get added to the session and
>> enter
>> the pending state.
>
> I get:
> InvalidRequestError: merge() with dont_load=True option does not
> support objects transient (i.e. unpersisted) objects.  flush() all
> changes on mapped instances before merging with dont_load=True.

right, if it were me I'd be caching things which I only loaded from the
database entirely.  Or, if there are ad-hoc structures I'd like to cache,
I'd construct that using non-ORM mapped constructs, or build it in such a
way that I don't have to ever merge() it back, unless I'm doing a persist
operation of some kind in which case I'd use full merge().


>> dirty objects are also mergeable, but only if you allow the Session to
>> load their existing state from the database (i.e. you dont use the
>> 'dont_load' flag).   If you're playing with caching you shouldn't put
>> dirty objects into a cache.
>
> I need dont_load otherwise my caching isn't really caching.

I need it too.  I just don't cache transient/dirty mapped objects.

>
>>
>> oof.   go to 0.4.8 at the very least.   0.5.6 preferably.
>
> In the past, I would often have to spend days porting from one version
> to another (0.2->0.3->0.4) because of some subtle changes in
> sqlalchemy (sessions, threading, way of accessing properties,
> mappers...).

SQLalchemy's version numbering puts what is essentially the "major"
version at 0.x, so 0.2, 0.3, 0.4 are all major versions.  The changes
between each of these are not subtle at all, and there are always
backwards incompatibilities at that level.

However on the third digit, those are our point releases.  We're very
careful not to introduce backwards incompatibility on those.    It's rare
that we have regressions on those and when we do, we find out very quickly
and another point release comes out almost immediately.  you can see
0.4.7p1 as evidence of that.   At most you might see some new deprecation
warnings pop up.



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

Reply via email to