]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- merge of ticket_3514 None-handling branch
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Aug 2015 21:04:33 +0000 (17:04 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Aug 2015 21:12:16 +0000 (17:12 -0400)
commitd14a4b480c3b43885707e4a6e2466589971ff4d5
treefab9267e749501c7b32c9e6e9f9f8429ef2b5644
parentceeb033054f09db3eccbde3fad1941ec42919a54
- merge of ticket_3514 None-handling branch
- Fixes to the ORM and to the postgresql JSON type regarding the
``None`` constant in conjunction with the Postgresql :class:`.JSON` type.  When
the :paramref:`.JSON.none_as_null` flag is left at its default
value of ``False``, the ORM will now correctly insert the Json
"'null'" string into the column whenever the value on the ORM
object is set to the value ``None`` or when the value ``None``
is used with :meth:`.Session.bulk_insert_mappings`,
**including** if the column has a default or server default on it.  This
makes use of a new type-level flag "evaluates_none" which is implemented
by the JSON type based on the none_as_null flag. fixes #3514
- Added a new constant :attr:`.postgresql.JSON.NULL`, indicating
that the JSON NULL value should be used for a value
regardless of other settings. part of fixes #3514
doc/build/changelog/changelog_11.rst
doc/build/changelog/migration_11.rst
lib/sqlalchemy/dialects/postgresql/json.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/sql/type_api.py
test/dialect/postgresql/test_types.py
test/orm/test_unitofworkv2.py