summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
Commit message (Collapse)AuthorAgeFilesLines
* Fix TypeError for class_mapper called w/ iterableKyle Stark2014-01-141-1/+1
| | | | | | When the class_ passed is not a mapped class but is actually an iterable, the string formatting operation fails with a TypeError, and the expected ArgumentError is not raised. Calling code which is using reflection and expects this error will fail (e.g. the sadisplay module). Conflicts: lib/sqlalchemy/orm/base.py
* - An adjustment to the :func:`.subqueryload` strategy which ensures thatMike Bayer2013-12-161-8/+32
| | | | | | | 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-1/+3
| | | | | | | 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]
* wrong method name...Mike Bayer2013-12-161-1/+1
|
* load_on_pending is different from enable_relationship_loading and shouldMike Bayer2013-12-152-6/+14
| | | | | | | not be superseded. both have a potential use. Conflicts: lib/sqlalchemy/orm/relationships.py
* 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-0/+5
| | | | | | | | | 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] Conflicts: test/orm/test_composites.py
* - Error message when a string arg sent to :func:`.relationship` whichMike Bayer2013-12-121-14/+14
| | | | | | | | | | doesn't resolve to a class or mapper has been corrected to work the same way as when a non-string arg is received, which indicates the name of the relationship which had the configurational error. [ticket:2888] Conflicts: lib/sqlalchemy/orm/relationships.py
* - documentation cleanup in ORM including [ticket:2816]Mike Bayer2013-12-073-35/+80
| | | | | Conflicts: lib/sqlalchemy/orm/mapper.py
* Fix cross referencesVraj Mohan2013-11-141-2/+2
|
* Fix indentation and escape *args and **kwargsVraj Mohan2013-11-142-3/+3
|
* - Fixed a regression introduced by :ticket:`2818` where the EXISTSMike Bayer2013-10-301-1/+1
| | | | | | 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.
* alphabetical orderingMike Bayer2013-10-131-17/+17
|
* - Added new option to :func:`.relationship` ``distinct_target_key``.Mike Bayer2013-10-133-5/+40
| | | | | | | | | | | | | | | | | | 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] Conflicts: lib/sqlalchemy/orm/relationships.py
* Fixed Query.exists() method for the case, when query doesn't have any ↵Vladimir Magamedov2013-09-041-1/+1
| | | | | | | filters applied. Conflicts: doc/build/changelog/changelog_09.rst
* - add version_id documentation [ticket:867]Mike Bayer2013-08-251-35/+39
| | | | | | - add the RETURNING glossary entry - other "seealso's" fixed - add doc for eager_defaults option
* Merge pull request #23 from yoloseem/mastermike bayer2013-08-252-3/+3
| | | | Fixed two typos.
* - this comment is wrong, the method here returns all mapper entitiesMike Bayer2013-08-241-4/+1
| | | | | - use a simple isinstance() check instead of looking for presence of "primary_entity" flag, that's a little unclear
* move FAQ to the docs, [ticket:2133]Mike Bayer2013-08-211-1/+20
| | | | | Conflicts: doc/build/index.rst
* Fixed bug where list instrumentation would fail to represent aMike Bayer2013-08-201-1/+4
| | | | | | | | | | | 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] Conflicts: doc/build/changelog/changelog_09.rst
* - use newly fixed WeakSequence (#2794) to not have to rely on class name for ↵Mike Bayer2013-08-181-5/+4
| | | | sorting in #2779
* Backported a change from 0.9 whereby the iteration of a hierarchyMike Bayer2013-08-181-1/+2
| | | | | | | | of mappers used in polymorphic inheritance loads is sorted on class name, which allows the SELECT statements generated for polymorphic queries to have deterministic rendering, which in turn helps with caching schemes that cache on the SQL string itself. [ticket:2779]
* Fixed a potential issue in an ordered sequence implementation usedMike Bayer2013-08-181-0/+1
| | | | | | | | | | | by the ORM to iterate mapper hierarchies; under the Jython interpreter this implementation wasn't ordered, even though cPython and Pypy maintained ordering. Also in 0.8.3. [ticket:2794] Conflicts: doc/build/changelog/changelog_09.rst lib/sqlalchemy/util/_collections.py
* - also do delete, add seealsos, formatting, etc. [ticket:2798]Mike Bayer2013-08-181-13/+37
|
* - add better notes to query.update(), most notably how to deal with a joined ↵Mike Bayer2013-08-181-12/+36
| | | | | | table update, [ticket:2798]
* - update ORM event docs to include that you can listen on an unmapped base,Mike Bayer2013-07-311-27/+30
| | | | | | | [ticket:2777] Conflicts: lib/sqlalchemy/orm/events.py
* Fixed bug in ORM-level event registration where the "raw" orMike Bayer2013-07-181-5/+8
| | | | | | "propagate" flags could potentially be mis-configured in some "unmapped base class" configurations. Also in 0.8.3. [ticket:2786]
* Merge pull request #17 from iElectric/docs/wording_yield_permike bayer2013-07-141-6/+6
| | | | wording about supported dialects for Query.yield_per
* A performance fix related to the usage of the :func:`.defer` optionMike Bayer2013-07-134-32/+38
| | | | | | | | | | | | | when loading mapped entities. The function overhead of applying a per-object deferred callable to an instance at load time was significantly higher than that of just loading the data from the row (note that ``defer()`` is meant to reduce DB/network overhead, not necessarily function call count); the function call overhead is now less than that of loading data from the column in all cases. There is also a reduction in the number of "lazy callable" objects created per load from N (total deferred values in the result) to 1 (total number of deferred cols). [ticket:2778]
* remove undoc-members from query docstring [ticket:2774]Mike Bayer2013-07-071-0/+7
|
* Fixed bug whereby attribute history functions would failMike Bayer2013-07-041-2/+2
| | | | | | | when an object we moved from "persistent" to "pending" using the :func:`.make_transient` function, for operations involving collection-based backrefs. [ticket:2773]
* - additional fix for [ticket:2750] where on an update, we make sure theMike Bayer2013-06-301-1/+2
| | | | value is present
* A warning is emitted when trying to flush an object of an inheritedMike Bayer2013-06-302-2/+36
| | | | | mapped class where the polymorphic discriminator has been assigned to a value that is invalid for the class. [ticket:2750]
* Fixed bug in polymorphic SQL generation where multiple joined-inheritanceMike Bayer2013-06-151-5/+10
| | | | | | | | | | entities against the same base class joined to each other as well would not track columns on the base table independently of each other if the string of joins were more than two entities long. Also in 0.8.2. [ticket:2759] Conflicts: doc/build/changelog/changelog_09.rst
* Fixed bug where sending a composite attribute into :meth:`.Query.order_by`Mike Bayer2013-06-101-1/+1
| | | | | | | | would produce a parenthesized expression not accepted by some databases. [ticket:2754] Conflicts: doc/build/changelog/changelog_09.rst
* Fixed the interaction between composite attributes andMike Bayer2013-06-102-15/+24
| | | | | | | | | the :func:`.aliased` function. Previously, composite attributes wouldn't work correctly in comparison operations when aliasing was applied. Also in 0.8.2. [ticket:2755] Conflicts: doc/build/changelog/changelog_09.rst
* Fixed a regression caused by [ticket:2682] whereby theMike Bayer2013-05-311-0/+6
| | | | | | | | | | evaluation invoked by :meth:`.Query.update` and :meth:`.Query.delete` would hit upon unsupported ``True`` and ``False`` symbols which now appear due to the usage of ``IS``. [ticket:2737] Conflicts: doc/build/changelog/changelog_08.rst
* restore functionality hereMike Bayer2013-05-301-0/+1
|
* Added a new method :meth:`.Query.select_entity_from` whichMike Bayer2013-05-302-10/+137
| | | | | | | | | will in 0.9 replace part of the functionality of :meth:`.Query.select_from`. In 0.8, the two methods perform the same function, so that code can be migrated to use the :meth:`.Query.select_entity_from` method as appropriate. See the 0.9 migration guide for details. [ticket:2736]
* - move an import stuck in the middle here...Mike Bayer2013-05-281-1/+1
|
* Fixed a regression from 0.7 caused by this ticket, whichMike Bayer2013-05-131-1/+8
| | | | | | | | made the check for recursion overflow in self-referential eager joining too loose, missing a particular circumstance where a subclass had lazy="joined" or "subquery" configured and the load was a "with_polymorphic" against the base. [ticket:2481]
* - moderinzed the docs for the foreign_keys parameter a bit,Mike Bayer2013-05-101-20/+53
| | | | [ticket:2725]
* - Fixed a regression from 0.7 where the contextmanager featureMike Bayer2013-04-301-3/+4
| | | | | | | of :meth:`.Session.begin_nested` would fail to correctly roll back the transaction when a flush error occurred, instead raising its own exception while leaving the session still pending a rollback. [ticket:2718]
* Fixes to the ``sqlalchemy.ext.serializer`` extension, includingMike Bayer2013-04-261-2/+13
| | | | | | | that the "id" passed from the pickler is turned into a string to prevent against bytes being parsed on Py3K, as well as that ``relationship()`` and ``orm.join()`` constructs are now properly serialized. [ticket:2698] and some other observed issues.
* - further cleanup. in particular, the left clause is never None. But we stillMike Bayer2013-04-251-24/+12
| | | | can have errors when we do the auto-join, these are both covered in test_joins
* we can always adapt to right also. suppose if rightMike Bayer2013-04-251-5/+1
| | | | were an alias of a table, should add tests for that.
* cleanupMike Bayer2013-04-252-58/+15
|
* everything passes with this!!!!!!! holy crap !!!!! and its the simplest of allMike Bayer2013-04-251-57/+69
|
* - attempt to replace the whole idea of "join_to_left" with a moreMike Bayer2013-04-242-36/+24
| | | | | fundamental and general purpose heuristic. this initial approach has about 60 tests failing but seems to have gone pretty far
* - merge exists() patch + changelogMike Bayer2013-04-231-0/+20
|\