0.4.5
=====
- orm
- - a small change in behavior to session.merge() - existing
- objects are checked for based on primary key attributes,
- not necessarily _instance_key. So the widely requested
+ - A small change in behavior to session.merge() - existing
+ objects are checked for based on primary key attributes, not
+ necessarily _instance_key. So the widely requested
capability, that:
-
+
x = MyObject(id=1)
x = sess.merge(x)
-
- will in fact load MyObject with id #1 from the database
- if present, is now available. merge() still
- copies the state of the given object to the persistent
- one, so an example like the above would typically have
- copied "None" from all attributes of "x" onto the persistent
- copy. These can be reverted using session.expire(x).
-
- - also fixed behavior in merge() whereby collection elements
- present on the destination but not the merged collection
+
+ will in fact load MyObject with id #1 from the database if
+ present, is now available. merge() still copies the state
+ of the given object to the persistent one, so an example
+ like the above would typically have copied "None" from all
+ attributes of "x" onto the persistent copy. These can be
+ reverted using session.expire(x).
+
+ - Also fixed behavior in merge() whereby collection elements
+ present on the destination but not the merged collection
were not being removed from the destination.
-
+
- Added a more aggressive check for "uncompiled mappers",
helps particularly with declarative layer [ticket:995]
- - Added comparable_property(), adds query Comparator
- behavior to regular, unmanaged Python properties
+ - Added comparable_property(), adds query Comparator behavior
+ to regular, unmanaged Python properties
- The functionality of query.with_polymorphic() has been
added to mapper() as a configuration option.
- random() is now a generic sql function and will compile to
the database's random implementation, if any.
-
- - fixed an issue in select() regarding its generation of
- FROM clauses, in rare circumstances two clauses could
- be produced when one was intended to cancel out the
- other. Some ORM queries with lots of eager loads
- might have seen this symptom.
-
+
+ - Fixed an issue in select() regarding its generation of FROM
+ clauses, in rare circumstances two clauses could be produced
+ when one was intended to cancel out the other. Some ORM
+ queries with lots of eager loads might have seen this
+ symptom.
+
- declarative extension
- The "synonym" function is now directly usable with
"declarative". Pass in the decorated property using the