summaryrefslogtreecommitdiff
path: root/test/orm
Commit message (Collapse)AuthorAgeFilesLines
* Merge bitbucket.org:rschoon/sqlalchemy into tMike Bayer2014-01-021-0/+4
|\
| * Don't barf on Session(info=...) from sessionmaker(info=None)Robin Schoonover2013-12-311-0/+4
| |
* | - Fixed regression where we don't check the given name against theMike Bayer2014-01-021-0/+16
| | | | | | | | | | | | correct string class when setting up a backref based on a name, therefore causing the error "too many values to unpack". This was related to the Py3k conversion. [ticket:2901]
* | - Fixed regression where we apparently still create an implicitMike Bayer2014-01-022-4/+32
|/ | | | | | | | | | alias when saying query(B).join(B.cs), where "C" is a joined inh class; however, this implicit alias was created only considering the immediate left side, and not a longer chain of joins along different joined-inh subclasses of the same base. As long as we're still implicitly aliasing in this case, the behavior is dialed back a bit so that it will alias the right side in a wider variety of cases. [ticket:2903]
* autoincrement hereMike Bayer2013-12-171-2/+2
|
* - An adjustment to the :func:`.subqueryload` strategy which ensures thatMike Bayer2013-12-161-1/+55
| | | | | | | the query runs after the loading process has begun; this is so that the subqueryload takes precedence over other loaders that may be hitting the same attribute due to other eager/noload situations at the wrong time. [ticket:2887]
* - Fixed bug when using joined table inheritance from a table to aMike Bayer2013-12-161-14/+65
| | | | | | | select/alias on the base, where the PK columns were also not same named; the persistence system would fail to copy primary key values from the base table to the inherited table upon INSERT. [ticket:2885]
* make the error message for [ticket:2889] more accurate, as we supportMike Bayer2013-12-121-1/+1
| | | | composites to many-to-ones now also
* - :func:`.composite` will raise an informative error message when theMike Bayer2013-12-121-1/+19
| | | | | | columns/attribute (names) passed don't resolve to a Column or mapped attribute (such as an erroneous tuple); previously raised an unbound local. [ticket:2889]
* - Added new argument ``include_backrefs=True`` to theMike Bayer2013-12-022-133/+281
| | | | | | | :func:`.validates` function; when set to False, a validation event will not be triggered if the event was initated as a backref to an attribute operation from the other side. [ticket:1535] - break out validation tests into an updated module test_validators
* - the pronoun removal commit. there was only one instance of aMike Bayer2013-11-301-2/+2
| | | | | | | | standalone gendered pronoun with a gender-neutral subject, but also have replaced all occurences of "his/her", "his or her", etc. The docs have always strived to account for both genders in any non-specific singular pronoun, however recent controversy in the community suggests that a zero-gendered-pronoun policy is probably best going forward.
* Merge branch 'orm-collections-list-clear' of ↵Mike Bayer2013-11-301-0/+10
|\ | | | | | | github.com:schettino72/sqlalchemy into list_clear
| * orm.collection, list.clear(). remove 'before_delete()', added unit-test.pr/40schettino722013-11-251-0/+10
| |
* | - add support for specifying tables or entities for "of"Mike Bayer2013-11-282-98/+119
| | | | | | | | | | - implement Query with_for_update() - rework docs and tests
* | - fix up rendering of "of"Mike Bayer2013-11-281-4/+4
| | | | | | | | | | | | - move out tests, dialect specific out of compiler, compiler tests use new API, legacy API tests in test_selecatble - add support for adaptation of ForUpdateArg, alias support in compilers
* | Merge branch 'for_update_of' of github.com:mlassnig/sqlalchemy into ↵Mike Bayer2013-11-281-0/+65
|\ \ | | | | | | | | | for_update_of
| * | added ORM supportMario Lassnig2013-11-141-2/+51
| | |
| * | add psql FOR UPDATE OF functionalityMario Lassnig2013-11-121-0/+16
| |/
* | clean up importsMike Bayer2013-11-231-9/+5
| |
* | - Some refinements to the :class:`.AliasedClass` construct with regardsMike Bayer2013-11-234-93/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to descriptors, like hybrids, synonyms, composites, user-defined descriptors, etc. The attribute adaptation which goes on has been made more robust, such that if a descriptor returns another instrumented attribute, rather than a compound SQL expression element, the operation will still proceed. Addtionally, the "adapted" operator will retain its class; previously, a change in class from ``InstrumentedAttribute`` to ``QueryableAttribute`` (a superclass) would interact with Python's operator system such that an expression like ``aliased(MyClass.x) > MyClass.x`` would reverse itself to read ``myclass.x < myclass_1.x``. The adapted attribute will also refer to the new :class:`.AliasedClass` as its parent which was not always the case before. [ticket:2872]
* | - The ``viewonly`` flag on :func:`.relationship` will now preventMike Bayer2013-11-191-0/+114
| | | | | | | | | | | | | | | | | | | | attribute history from being written on behalf of the target attribute. This has the effect of the object not being written to the Session.dirty list if it is mutated. Previously, the object would be present in Session.dirty, but no change would take place on behalf of the modified attribute during flush. The attribute still emits events such as backref events and user-defined events and will still receive mutations from backrefs. [ticket:2833]
* | - remove informix dialect, moved out to ↵Mike Bayer2013-11-1712-30/+2
| | | | | | | | | | | | https://bitbucket.org/zzzeek/sqlalchemy_informixdb - remove informix, maxdb, access symbols from tests etc.
* | Fixed bug where usage of new :class:`.Bundle` object would causeMike Bayer2013-11-131-1/+12
|/ | | | the :attr:`.Query.column_descriptions` attribute to fail.
* - Fixed a regression introduced by :ticket:`2818` where the EXISTSMike Bayer2013-10-301-4/+16
| | | | | | query being generated would produce a "columns being replaced" warning for a statement with two same-named columns, as the internal SELECT wouldn't have use_labels set.
* python2 pickle here failsMike Bayer2013-10-251-0/+3
|
* - :func:`.attributes.get_history()` when used with a scalar column-mappedMike Bayer2013-10-252-5/+72
| | | | | | | | | attribute will now honor the "passive" flag passed to it; as this defaults to ``PASSIVE_OFF``, the function will by default query the database if the value is not present. This is a behavioral change vs. 0.8. [ticket:2787] - Added new method :meth:`.AttributeState.load_history`, works like :attr:`.AttributeState.history` but also fires loader callables.
* An overhaul of expression handling for special symbols particularlyMike Bayer2013-10-231-1/+0
| | | | | | | | | | with conjunctions, e.g. ``None`` :func:`.expression.null` :func:`.expression.true` :func:`.expression.false`, including consistency in rendering NULL in conjunctions, "short-circuiting" of :func:`.and_` and :func:`.or_` expressions which contain boolean constants, and rendering of boolean constants and expressions as compared to "1" or "0" for backends that don't feature ``true``/``false`` constants. [ticket:2804]
* use a set here alsoMike Bayer2013-10-181-2/+2
|
* - fix non-deterministic ordering pointMike Bayer2013-10-141-2/+3
|
* - fix test warning here (oursql)Mike Bayer2013-10-141-2/+2
|
* - Added new option to :func:`.relationship` ``distinct_target_key``.Mike Bayer2013-10-131-0/+194
| | | | | | | | | | | | | | | This enables the subquery eager loader strategy to apply a DISTINCT to the innermost SELECT subquery, to assist in the case where duplicate rows are generated by the innermost query which corresponds to this relationship (there's not yet a general solution to the issue of dupe rows within subquery eager loading, however, when joins outside of the innermost subquery produce dupes). When the flag is set to ``True``, the DISTINCT is rendered unconditionally, and when it is set to ``None``, DISTINCT is rendered if the innermost relationship targets columns that do not comprise a full primary key. The option defaults to False in 0.8 (e.g. off by default in all cases), None in 0.9 (e.g. automatic by default). Thanks to Alexander Koval for help with this. [ticket:2836]
* use accepts scalar loader here so we deal with _ProxyImpl correctlyMike Bayer2013-10-111-1/+3
|
* - fix bug due to regression from #2793, make sure we only go to loadMike Bayer2013-10-111-1/+13
| | | | | scalar attributes here and not relationships, else we get an error if there's no actual scalars to load
* - fix a bunch of test failuresMike Bayer2013-10-082-6/+7
|
* - add an option to Bundle single_entity=True to allow for singleMike Bayer2013-10-071-0/+31
| | | | entity returns without otherwise changing much [ticket:2824]
* - add some tests for propagate of wildcard lazyloadMike Bayer2013-10-061-1/+48
|
* 11th hour realization that Load() needs to do the _chop_path() thing asMike Bayer2013-10-061-0/+79
| | | | well. this probably has some bugs
* - merge ticket_1418 branch, [ticket:1418]Mike Bayer2013-10-069-943/+1337
| | | | | | | | | | | | | - The system of loader options has been entirely rearchitected to build upon a much more comprehensive base, the :class:`.Load` object. This base allows any common loader option like :func:`.joinedload`, :func:`.defer`, etc. to be used in a "chained" style for the purpose of specifying options down a path, such as ``joinedload("foo").subqueryload("bar")``. The new system supersedes the usage of dot-separated path names, multiple attributes within options, and the usage of ``_all()`` options. - Added a new load option :func:`.orm.load_only`. This allows a series of column names to be specified as loading "only" those attributes, deferring the rest.
* fix entity_zero resolutionMike Bayer2013-10-041-0/+13
|
* - A new construct :class:`.Bundle` is added, which allows for specificationMike Bayer2013-10-032-3/+291
| | | | | | | | | | | | | | | | of groups of column expressions to a :class:`.Query` construct. The group of columns are returned as a single tuple by default. The behavior of :class:`.Bundle` can be overridden however to provide any sort of result processing to the returned row. One example included is :attr:`.Composite.Comparator.bundle`, which applies a bundled form of a "composite" mapped attribute. [ticket:2824] - The :func:`.composite` construct now maintains the return object when used in a column-oriented :class:`.Query`, rather than expanding out into individual columns. This makes use of the new :class:`.Bundle` feature internally. This behavior is backwards incompatible; to select from a composite column which will expand out, use ``MyClass.some_composite.clauses``.
* - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynorMike Bayer2013-09-222-6/+4
|
* - modify what we did in [ticket:2793] so that we can also set theMike Bayer2013-09-061-0/+86
| | | | | version id programmatically outside of the generator. using this system, we can also leave the version id alone.
* Fixed Query.exists() method for the case, when query doesn't have any ↵Vladimir Magamedov2013-09-041-1/+10
| | | | filters applied.
* - cx_oracle seems to have a bug here though it is hard to track downMike Bayer2013-08-271-0/+1
| | | | - cx_oracle dialect doesn't use normal col names, lets just not rely on that for now
* - ensure rowcount is returned for an UPDATE with no implicit returningMike Bayer2013-08-251-1/+1
| | | | | - modernize test for that - use py3k compatible next() in test_returning/test_versioning
* - The ``version_id_generator`` parameter of ``Mapper`` can now be specifiedMike Bayer2013-08-252-5/+196
| | | | | | | | | | | | | | | | | | | | | to rely upon server generated version identifiers, using triggers or other database-provided versioning features, by passing the value ``False``. The ORM will use RETURNING when available to immediately load the new version identifier, else it will emit a second SELECT. [ticket:2793] - The ``eager_defaults`` flag of :class:`.Mapper` will now allow the newly generated default values to be fetched using an inline RETURNING clause, rather than a second SELECT statement, for backends that support RETURNING. - Added a new variant to :meth:`.ValuesBase.returning` called :meth:`.ValuesBase.return_defaults`; this allows arbitrary columns to be added to the RETURNING clause of the statement without interfering with the compilers usual "implicit returning" feature, which is used to efficiently fetch newly generated primary key values. For supporting backends, a dictionary of all fetched values is present at :attr:`.ResultProxy.returned_defaults`. - add a glossary entry for RETURNING - add documentation for version id generation, [ticket:867]
* Fixed bug where list instrumentation would fail to represent aMike Bayer2013-08-201-3/+8
| | | | | | | | setslice of ``[0:0]`` correctly, which in particular could occur when using ``insert(0, item)`` with the association proxy. Due to some quirk in Python collections, the issue was much more likely with Python 3 rather than 2. Also in 0.8.3, 0.7.11. [ticket:2807]
* more tests regarding expiry, deferralMike Bayer2013-08-171-1/+57
|
* some tests regarding how newly inserted rows are treated as far as fetch on ↵Mike Bayer2013-08-171-1/+91
| | | | access
* - spot checking of imports, obsolete functionsMike Bayer2013-08-171-4/+4
|