You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add Attribute base class for custom model casts and sqlite cast tests
- Add `Attribute(BaseModel)` to caster.py as a reusable mixin for custom
ORM casts — subclasses get JSON serialize/deserialize for free via
`get`/`set` classmethods backed by Pydantic's model_dump_json
- Export `Attribute` from `fastapi_startkit.masoniteorm`
- Fix `get_attributes_for_insert` to apply `set` casts to `_attributes`
so `Address` instances and dicts can be passed directly to `create()`
without manual JSON serialization
- Add `preferences` (dict/list) and `address` (Attribute) columns to the
users fixture table; seed and model updated accordingly
- Add `test_sqlite_model_casts.py` covering int, str, bool, dict, list,
and custom Pydantic Attribute casts including insert with instance/dict
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments