Skip to content

0.22.2

Latest

Choose a tag to compare

@igorbenav igorbenav released this 28 May 03:01
· 2 commits to main since this release
b6afb2d

FastCRUD 0.22.2 Release Notes

FastCRUD 0.22.2 is a single-fix patch release addressing a column-enumeration bug in create() that affected models using SQLAlchemy joined-table inheritance.

Fixed

Inherited Columns Missing from create() Response

For models using joined-table inheritance, create(schema_to_select=...) was building its response dict from db_object.__table__.columns — which only enumerates the immediate table's columns. Any column defined on a parent table (including the polymorphic discriminator) was silently dropped, causing KeyError or partial-data results when the response schema referenced an inherited field.

Example: with Entity → User → Operator joined inheritance, create() on an Operator would only return columns from the operators table, missing name (from users), entity_type (from entities), etc.

Fix: replaced __table__.columns with SQLAlchemy's inspect(cls).column_attrs, which walks the full mapped attribute chain including inherited columns. No behavior change for non-polymorphic models.

Reported by @UnoYakshi in #307; fixed by @Newton-hubs in #330.


What's Changed

  • Use mapper.column_attrs to include inherited columns in create() response by @Newton-hubs in #330

New Contributors

Full Changelog: v0.22.1...v0.22.2