| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
and column_property(), forces attribute events to
always load the "old" value, so that it's available to
attributes.get_history(). [ticket:1961]
- modernize test_relationship, give test classes meaningful names
|
| |
|
|
| |
single column as well as a list or tuple. [ticket:1971]
|
| |
|
|
| |
- other modernizations to mapper() doc
|
| |
|
|
|
| |
transformed to the empty slice -1:0 that resulted in
IndexError. [ticket:1968]
|
| |
|
|
|
|
|
|
|
| |
cuts
down on clutter, timeit says there's a teeny performance gain, at least where
the access is compared against attr.subattr. these aren't super-critical
calls anyway
- slight inlining in _class_to_mapper
|
| |
|
|
| |
- [ticket:1965] is invalid
|
| |
|
|
|
| |
strategy would fail if the entity was an aliased()
construct. [ticket:1964]
|
| |
|
|
|
|
|
| |
of joinedload() joins if a previous join in that chain
is an outer join, thus allowing primary rows without
a referenced child row to be correctly returned
in results. [ticket:1954]
|
| | |
|
| |
|
|
|
|
|
|
|
| |
which occurred on an object that was clean except for
preceding mutable attribute changes would fail to strongly
reference itself in the identity map. This would cause the
object to be garbage collected, losing track of any changes
that weren't previously saved in the "mutable changes"
dictionary.
|
| |
|
|
|
|
| |
the wild,
[ticket:1861]
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
return the query's statement as a scalar subquery
with /without label [ticket:1920];
query.with_entities(*ent), replaces the SELECT list of
the query with new entities.
Roughly equivalent to a generative form of query.values()
which accepts mapped entities as well as column
expressions.
|
| |
|
|
|
| |
present, and that this results in a positive response for "changed"
[ticket:1928]
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Issues the usual "lazy" load operation automatically
as the object is populated. The use case
here is when loading objects to be placed in
an offline cache, or otherwise used after
the session isn't available, and straight 'select'
loading, not 'joined' or 'subquery', is desired.
[ticket:1914]
|
| |
|
|
|
| |
would mis-apply labels if any of the column
expressions were un-labeled.
|
| |
|
|
|
|
| |
expiration would fail if the column expression key was
a class attribute with a different keyname as the
actual column name. [ticket:1935]
|
| |
|
|
|
|
|
|
|
| |
prop.columns.append(col)
logic when columns are present in a joined subclass with an attribute name different
than the column name itself [ticket:1931]
- add coverage to verify that we need to check (obj.name or name) when
deciding if a Column from a mixin should be added to the mapped table
|
| |
|
|
|
| |
cut down method calls by about 9% in some circumstances.
[ticket:1932]
|
| |
|
|
|
|
|
| |
correctly to a single-table inheritance scheme where
the attribute name is different than that of the column.
[ticket:1930]. Note [ticket:1931] which is the same
issue for joined inh, not yet resolved.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- docs about backref cascade
- Another new flag on relationship(), cascade_backrefs,
disables the "save-update" cascade when the event was
initiated on the "reverse" side of a bidirectional
relationship. This is a cleaner behavior so that
many-to-ones can be set on a transient object without
it getting sucked into the child object's session,
while still allowing the forward collection to
cascade. We *might* default this to False in 0.7.
|
| |
|
|
|
|
|
|
| |
ensure that a subsequent call to query.join()
will use the select_from() entity, assuming it's
a mapped entity and not a plain selectable,
as the default "left" side, not the first entity
in the Query object's list of entities.
|
| |
|
|
|
| |
right side to the right side of the left's join
inappropriately [ticket:1925]
|
| |
|
|
|
| |
called if a Session is already present (checks only the
current thread) [ticket:1924]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The exception raised by Session when it is used
subsequent to a subtransaction rollback (which is what
happens when a flush fails in autocommit=False mode) has
now been reworded (this is the "inactive due to a
rollback in a subtransaction" message). In particular,
if the rollback was due to an exception during flush(),
the message states this is the case, and reiterates the
string form of the original exception that occurred
during flush. If the session is closed due to explicit
usage of subtransactions (not very common), the message
just states this is the case.
- The exception raised by Mapper when repeated requests to
its initialization are made after initialization already
failed no longer assumes the "hasattr" case, since
there's other scenarios in which this message gets
emitted, and the message also does not compound onto
itself multiple times - you get the same message for
each attempt at usage. The misnomer "compiles" is being
traded out for "initialize".
|
| |
|
|
|
| |
passed an empty list to "include_properties" on
mapper() [ticket:1918]
|
| |
|
|
| |
load the collection being validated. [ticket:1916]
|
| |
|
|
|
|
|
|
|
|
|
|
| |
working correctly with single table inheritance
for a relationship from a subclass - the "where
type in (x, y, z)" only gets placed on the inside,
instead of repeatedly.
- When using from_self() with single table inheritance,
the "where type in (x, y, z)" is placed on the outside
of the query only, instead of repeatedly. May make
some more adjustments to this.
|
| |
|
|
|
|
|
| |
an object from one reference to another, with
backrefs involved, where the initiating parent
was a subclass (with its own mapper) of the
previous parent.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
when placed only on the many-to-one side of a
relationship; documentation has been clarified
that passive_updates=False should really be on the
one-to-many side.
- Placing passive_deletes=True on a many-to-one emits
a warning, since you probably intended to put it on
the one-to-many side.
|
| |
|
|
|
|
|
|
| |
- Added an assertion during flush which ensures
that no NULL-holding identity keys were generated
on "newly persistent" objects.
This can occur when user defined code inadvertently
triggers flushes on not-fully-loaded objects.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
remove operations against iteration methods,
which now pre-buffer before returning an
iterable. This because asyncrhonous gc
can remove items via the gc thread at any time.
[ticket:1891]
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| |/
|
|
|
|
|
| |
and will use the non-persistent values of their pk/fk
attributes in order to formulate the criterion.
Docs are also clarified as to the purpose of with_parent().
- fix for PG test executing an alias()
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
by the versioning example is deprecated;
now use mapper.get_property_by_column() which
will remain the public method for this.
- turned TODO in the history example into an assertion
with a descriptive reason
|
| | | |
|
| | | |
|