| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the current state, not the "committed" state,
of foreign and primary key attributes
when issuing SQL, if a flush is not in process.
Previously, only the database-committed state would
be used. In particular, this would cause a many-to-one
get()-on-lazyload operation to fail, as autoflush
is not triggered on these loads when the attributes are
determined and the "committed" state may not be
available. [ticket:1910]
- A new flag on relationship(), load_on_pending, allows
the lazy loader to fire off on pending objects without a
flush taking place, as well as a transient object that's
been manually "attached" to the session. Note that this
flag blocks attribute events from taking place when an
object is loaded, so backrefs aren't available until
after a flush. The flag is only intended for very
specific use cases.
|
|
|
|
|
|
|
|
|
|
|
|
| |
'deleted', which prohibits the object from
being re-add()ed to the session, as previously
the object would live in the identity map
silently until its attributes were accessed.
The make_transient() function now resets this
flag along with the "key" flag.
- make_transient() can be safely called on an
already transient instance.
|
|
|
|
|
|
|
| |
including the case where the superclass is mapped
but the subclass is not. Any attempts to access
cls._sa_class_manager.mapper now raise
UnmappedClassError(). [ticket:1142]
|
|
|
|
| |
instance if that instance is "pending". [ticket:1789]
|
| |
|
| |
|
|
|
|
|
| |
cleanup with less complexity, datamembers,
method calls, blank dictionary creates.
|
|
|
|
|
|
|
|
| |
the version called by column loaders on an incomplete row (i.e.
joined table inheritance). there are more dramatic changes
that can be made here but this one is conservative so far
as far as how much we're altering how InstanceState tracks
"expired" attributes.
|
|
|
|
|
|
|
|
|
|
| |
sqlalchemy.orm.strategies, most logging calls during row
loading have been removed. These were never very helpful
and cluttered up the code.
- Some internal streamlining of object loading grants a
small speedup for large results, estimates are around
10-15%.
|
| |
|
|
|
|
| |
- remove pickle language from regular unmapped class error
|
| |
|
| |
|
|
|
|
|
| |
`__len__()` or `__nonzero__()` method resulted in state
changes. [ticket:1501]
|
|
|
|
| |
state mismatch AssertionErrors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- renamed PASSIVE_NO_CALLABLES to PASSIVE_NO_FETCH
- passive now propagates all the way through lazy callables,
all the way into query._get(), so that many-to-one lazy load
can load the instance via the local session but not trigger
any SQL if not available, fixes [ticket:1298] without
messing up consistency of tests added in r6201
- many-to-one also handles returning PASSIVE_NO_RESULT
for the "old" value thus eliminating the need for the
previous value even if the new value is None
- query._get() uses identity_map.get(), which has been
changed to no longer raise KeyError, thus providing
mythical time savings that didn't seem to make any
difference in how fast the unit tests ran.
|
| |
|
|
|
|
|
| |
placed back in a session would not be fully garbage collected
unless the Session were explicitly closed out.
|
|
|
|
|
| |
reduce the memory footprint of pickled instances. The format
should be backwards compatible with that of 0.5.4 and previous.
|
|
|
|
| |
and PGArray, failed to be merged() properly.
|
|
|
|
|
| |
wouldn't be deserialized correctly when the whole object
was serialized. [ticket:1426]
|
|
|
|
|
|
|
|
|
|
|
| |
i.e. operations that were scanning the full session,
including an extremely expensive one that was erroneously
assuming primary key values were changing when this
was not the case.
* one edge case remains which may invoke a full scan,
if an existing primary key attribute is modified
to a new value.
|
|
in conjunction with large mapper graphs, large numbers of
objects:
- The Session's "weak referencing" behavior is now *full* -
no strong references whatsoever are made to a mapped object
or related items/collections in its __dict__. Backrefs and
other cycles in objects no longer affect the Session's ability
to lose all references to unmodified objects. Objects with
pending changes still are maintained strongly until flush.
[ticket:1398]
The implementation also improves performance by moving
the "resurrection" process of garbage collected items
to only be relevant for mappings that map "mutable"
attributes (i.e. PickleType, composite attrs). This removes
overhead from the gc process and simplifies internal
behavior.
If a "mutable" attribute change is the sole change on an object
which is then dereferenced, the mapper will not have access to
other attribute state when the UPDATE is issued. This may present
itself differently to some MapperExtensions.
The change also affects the internal attribute API, but not
the AttributeExtension interface nor any of the publically
documented attribute functions.
- The unit of work no longer genererates a graph of "dependency"
processors for the full graph of mappers during flush(), instead
creating such processors only for those mappers which represent
objects with pending changes. This saves a tremendous number
of method calls in the context of a large interconnected
graph of mappers.
- Cached a wasteful "table sort" operation that previously
occured multiple times per flush, also removing significant
method call count from flush().
- Other redundant behaviors have been simplified in
mapper._save_obj().
|