Bug fixes:
- Unset
instance
attribute when an error occurs during aload
call (:issue:`114`). Thanks :user:`vgavro` for the catch and patch.
Bug fixes:
- Prevent unnecessary queries when using the fields.Related (:issue:`106`). Thanks :user:`xarg` for reporting and thanks :user:`jmuhlich` for the PR.
Features:
- Invalid inputs for compound primary keys raise a
ValidationError
when deserializing a scalar value (:issue:`103`). Thanks :user:`YuriHeupa` for the PR.
Bug fixes:
- Fix compatibility with marshmallow>=3.x.
Bug fixes:
- Reset
ModelSchema.instance
after eachload
call, allowing schema instances to be reused (:issue:`78`). Thanks :user:`georgexsh` for reporting.
Other changes:
- Test against Python 3.6.
Features:
- Add support for TypeDecorator-based types (:issue:`83`). Thanks :user:`frol`.
Bug fixes:
- Fix bug that caused a validation errors for custom column types that have the
python_type
ofuuid.UUID
(:issue:`54`). Thanks :user:`wkevina` and thanks :user:`kelvinhammond` for the fix.
Other changes:
- Drop official support for Python 3.3. Python>=3.4 and Python 2.7 are supported.
Features:
- Allow overriding field class returned by
field_for
by adding thefield_class
param (:issue:`81`). Thanks :user:`cancan101`.
Features:
- Support for SQLAlchemy JSON type (in SQLAlchemy>=1.1) (:issue:`74`). Thanks :user:`ewittle` for the PR.
Features:
- Enable deserialization of many-to-one nested objects that do not exist in the database (:issue:`69`). Thanks :user:`seanharr11` for the PR.
Bug fixes:
- Depend on SQLAlchemy>=0.9.7, since marshmallow-sqlalchemy uses
sqlalchemy.dialects.postgresql.JSONB
(:issue:`65`). Thanks :user:`alejom99` for reporting.
Bug fixes:
ModelSchema
andTableSchema
respect field order if theordered=True
class Meta option is set (:issue:`52`). Thanks :user:`jeffwidman` for reporting and :user:`jmcarp` for the patch.- Declared fields are not introspected in order to support, e.g.
column_property
(:issue:`57`). Thanks :user:`jmcarp`.
Features:
ModelSchema
andTableSchema
will respect theTYPE_MAPPING
class variable of Schema subclasses when convertingColumns
toFields
(:issue:`42`). Thanks :user:`dwieeb` for the suggestion.
Bug fixes:
- Don't make marshmallow fields required for non-nullable columns if a column has a default value or autoincrements (:issue:`47`). Thanks :user:`jmcarp` for the fix. Thanks :user:`AdrielVelazquez` for reporting.
Features:
- Add
include_fk
class Meta option (:issue:`36`). Thanks :user:`jmcarp`. - Non-nullable columns will generated required marshmallow Fields (:issue:`40`). Thanks :user:`jmcarp`.
- Improve support for MySQL BIT field (:issue:`41`). Thanks :user:`rudaporto`.
- Backwards-incompatible: Remove
fields.get_primary_columns
in favor offields.get_primary_keys
. - Backwards-incompatible: Remove
Related.related_columns
in favor offields.related_keys
.
Bug fixes:
- Fix serializing relationships when using non-default column names (:issue:`44`). Thanks :user:`jmcarp` for the fix. Thanks :user:`repole` for the bug report.
Features:
- Support for compound primary keys. Thanks :user:`jmcarp`.
Other changes:
- Supports marshmallow>=2.0.0.
- Add
instance
argument toModelSchema
constructor andModelSchema.load
which allows for updating existing DB rows (:issue:`26`). Thanks :user:`sssilver` for reporting and :user:`jmcarp` for the patch. - Don't autogenerate fields that are in
Meta.exclude
(:issue:`27`). Thanks :user:`jmcarp`. - Raise
ModelConversionError
if converting properties whose column don't define apython_type
. Thanks :user:`jmcarp`. - Backwards-incompatible:
ModelSchema.make_object
is removed in favor of decoratedmake_instance
method for compatibility with marshmallow>=2.0.0rc2.
Bug fixes:
- Now compatible with marshmallow>=2.0.0rc1.
- Correctly pass keyword arguments from
field_for
to generatedList
fields (:issue:`25`). Thanks :user:`sssilver` for reporting.
Features:
- Add
TableSchema
for generatingSchemas
from tables (:issue:`4`). Thanks :user:`jmcarp`.
Bug fixes:
- Allow
session
to be passed toModelSchema.validate
, since it requires it. Thanks :user:`dpwrussell`. - When serializing, don't skip overriden fields that are part of a polymorphic hierarchy (:issue:`18`). Thanks again :user:`dpwrussell`.
Support:
- Docs: Add new recipe for automatic generation of schemas. Thanks :user:`dpwrussell`.
Features:
- Backwards-incompatible: Relationships are (de)serialized by a new, more efficient
Related
column (:issue:`7`). Thanks :user:`jmcarp`. - Improve support for MySQL types (:issue:`1`). Thanks :user:`rmackinnon`.
- Improve support for Postgres ARRAY types (:issue:`6`). Thanks :user:`jmcarp`.
ModelSchema
no longer requires thesqla_session
class Meta option. ASession
can be passed to the constructor or to theModelSchema.load
method (:issue:`11`). Thanks :user:`dtheodor` for the suggestion.
Bug fixes:
- Null foreign keys are serialized correctly as
None
(:issue:`8`). Thanks :user:`mitchej123`. - Properly handle a relationship specifies
uselist=False
(:issue:`#17`). Thanks :user:`dpwrussell`.
Features:
- Add
field_for
function for generating marshmallow Fields from SQLAlchemy mapped class properties.
Support:
- Docs: Add "Overriding generated fields" section to "Recipes".
Bug fixes:
- Fix
keygetter
class Meta option.
- First release.