summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\
| * adding convenience method exists() to Query (see # 2673)Diana Clarke2013-03-291-0/+20
| |
* | Added a conditional to the unpickling process for ORMMike Bayer2013-04-231-1/+2
| | | | | | | | | | | | | | mapped objects, such that if the reference to the object were lost when the object was pickled, we don't erroneously try to set up _sa_instance_state - fixes a NoneType error.
* | Fixed bug where many-to-many relationship with uselist=FalseMike Bayer2013-04-211-3/+7
| | | | | | | | | | | | would fail to delete the association row and raise an error if the scalar attribute were set to None. Also in 0.7.11. [ticket:2710]
* | - dont do a boolean check on the mapped objectMike Bayer2013-04-201-1/+1
| |
* | Improved the behavior of instance management regardingMike Bayer2013-04-204-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the creation of strong references within the Session; an object will no longer have an internal reference cycle created if it's in the transient state or moves into the detached state - the strong ref is created only when the object is attached to a Session and is removed when the object is detached. This makes it somewhat safer for an object to have a `__del__()` method, even though this is not recommended, as relationships with backrefs produce cycles too. A warning has been added when a class with a `__del__()` method is mapped. [ticket:2708]
* | python2.5 fixMike Bayer2013-04-181-1/+2
| |
* | Reworked internal exception raises that emitMike Bayer2013-04-181-6/+6
| | | | | | | | | | | | | | | | | | a rollback() before re-raising, so that the stack trace is preserved from sys.exc_info() before entering the rollback. This so that the traceback is preserved when using coroutine frameworks which may have switched contexts before the rollback function returns. [ticket:2703]
* | - additional test + correction for [ticket:2699]Mike Bayer2013-04-181-4/+5
| |
* | Fixed bug whereby ORM would run the wrong kind ofMike Bayer2013-04-111-0/+2
| | | | | | | | | | | | | | | | | | query when refreshing an inheritance-mapped class where the superclass was mapped to a non-Table object, like a custom join() or a select(), running a query that assumed a hierarchy that's mapped to individual Table-per-class. [ticket:2697]