summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/declarative/clsregistry.py
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed an unlikely race condition observed in some exotic end-userMike Bayer2014-09-181-1/+6
| | | | | | | | setups, where the attempt to check for "duplicate class name" in declarative would hit upon a not-totally-cleaned-up weak reference related to some other class being removed; the check here now ensures the weakref still references an object before calling upon it further. fixes #3208
* PEP8 style fixesBrian Jarrett2014-07-131-14/+16
|
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - Support is improved for supplying a :func:`.join` construct as theMike Bayer2014-01-221-0/+4
| | | | | | | | | | target of :paramref:`.relationship.secondary` for the purposes of creating very complex :func:`.relationship` join conditions. The change includes adjustments to query joining, joined eager loading to not render a SELECT subquery, changes to lazy loading such that the "secondary" target is properly included in the SELECT, and changes to declarative to better support specification of a join() object with classes as targets.
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - The :class:`.DeferredReflection` class has been enhanced to provideMike Bayer2013-12-031-37/+52
| | | | | | | | | | | | | | | | automatic reflection support for the "secondary" table referred to by a :func:`.relationship`. "secondary", when specified either as a string table name, or as a :class:`.Table` object with only a name and :class:`.MetaData` object will also be included in the reflection process when :meth:`.DeferredReflection.prepare` is called. [ticket:2865] - clsregistry._resolver() now uses a stateful _class_resolver() class in order to handle the work of mapping strings to objects. This is to provide for simpler extensibility, namely a ._resolvers collection of ad-hoc name resolution functions; the DeferredReflection class adds its own resolver here in order to handle relationship(secondary) names which generate new Table objects.
* Fixed bug where in Py2K a unicode literal would not be acceptedMike Bayer2013-11-291-1/+1
| | | | | as the string name of a class or other argument within declarative using :func:`.relationship`.
* ORM descriptors such as hybrid properties can now be referencedMike Bayer2013-07-021-10/+12
| | | | | | by name in a string argument used with ``order_by``, ``primaryjoin``, or similar in :func:`.relationship`, in addition to column-bound attributes. [ticket:2761]
* - the raw 2to3 runMike Bayer2013-04-271-3/+3
| | | | - went through examples/ and cleaned out excess list() calls
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* Allow use of synonyms in primaryjoin / secondaryjoin conditionsRichard Mitchell2012-11-271-2/+5
|
* just a pep8 pass of lib/sqlalchemy/ext/declarativeDiana Clarke2012-11-191-2/+10
|
* - store only MultipleClassMarkers inside of ModuleMarker, thenMike Bayer2012-10-281-23/+56
| | | | | | store ModuleMarkers for multiple roots, one for each token in a module path. this allows partial path resolution. - docs to this effect
* - reorganization of declarative such that file sizes are managable again.Mike Bayer2012-08-051-0/+244
the vast majority of file lines are spent on documentation, which moves into package __init__. The core declarative idea lives in base and is back down to its originally low size of under 500 lines. The various helpers and such move into api.py, and the full span of string lookup moves into a new module clsregistry. the rest of declarative only refers to two functions in clsregistry in three places inside of base. - [feature] Declarative now maintains a registry of classes by string name as well as by full module-qualified name. Multiple classes with the same name can now be looked up based on a module-qualified string within relationship(). Simple class name lookups where more than one class shares the same name now raises an informative error message. [ticket:2338] - lots of tests to ensure the new weak referencing memory management is maintained by the new class registry system. this ticket was served very well by waiting to do #2526 first, else this would have needed to be rewritten anyway.