Mike Bayer avatar Mike Bayer committed 14634cc

more migration notes

Comments (0)

Files changed (2)

doc/build/changelog/migration_08.rst

 
 :ticket:`2438` :ticket:`1106`
 
+Events Can Be Applied to Unmapped Superclasses
+----------------------------------------------
+
+Mapper and instance events can now be associated with an unmapped
+superclass, where those events will be propagated to subclasses
+as those subclasses are mapped.   The ``propagate=True`` flag
+should be used.  This feature allows events to be associated
+with a declarative base class::
+
+    from sqlalchemy.ext.declarative import declarative_base
+
+    Base = declarative_base()
+
+    @event.listens_for("load", Base, propagate=True)
+    def on_load(target, context):
+        print "New instance loaded:", target
+
+    # on_load() will be applied to SomeClass
+    class SomeClass(Base):
+        __tablename__ = 'sometable'
+
+        # ...
+
+:ticket:`2585`
+
+Declarative Distinguishes Between Modules/Packages
+--------------------------------------------------
+
+A key feature of Declarative is the ability to refer
+to other mapped classes using their string name.   The
+registry of class names is now sensitive to the owning
+module and package of a given class.   The classes
+can be referred to via dotted name in expressions::
+
+    class Snack(Base):
+        # ...
+
+        "peanuts":relationship("nuts.Peanut",
+                primaryjoin="nuts.Peanut.snack_id == Snack.id")
+
+The resolution allows that any full or partial
+disambiguating package name can be used.   If the
+path to a particular class is still ambiguous,
+an error is raised.
+
+:ticket:`2338`
+
+
 New DeferredReflection Feature in Declarative
 ---------------------------------------------
 
 
 :ticket:`2179`
 
+Repaired the Event Targeting of :class:`.InstrumentationEvents`
+----------------------------------------------------------------
+
+The :class:`.InstrumentationEvents` series of event targets have
+documented that the events will only be fired off according to
+the actual class passed as a target.  Through 0.7, this wasn't the
+case, and any event listener applied to :class:`.InstrumentationEvents`
+would be invoked for all classes mapped.  In 0.8, additional
+logic has been added so that the events will only invoke for those
+classes sent in.  The ``propagate`` flag here is set to ``True``
+by default as class instrumentation events are typically used to
+intercept classes that aren't yet created.
+
+:ticket:`2590`
+
 No more magic coercion of "=" to IN when comparing to subquery in MS-SQL
 ------------------------------------------------------------------------
 
 :ticket:`2277`
 
 Fixed the behavior of :meth:`.Session.is_modified`
--------------------------------------------
+--------------------------------------------------
 
 The :meth:`.Session.is_modified` method accepts an argument
 ``passive`` which basically should not be necessary, the

doc/build/glossary.rst

     :sorted:
 
     descriptor
+    descriptors
         In Python, a descriptor is an object attribute with “binding behavior”, one whose attribute access has been overridden by methods in the `descriptor protocol <http://docs.python.org/howto/descriptor.html>`_.
         Those methods are __get__(), __set__(), and __delete__(). If any of those methods are defined
         for an object, it is said to be a descriptor.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.