diff --git a/README.md b/README.md index 5f56cfa3..8001bd29 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,10 @@ Create the new entities and relationships and add them to the model ### 9.3 SQLAlchemy Model Inside `app/models`, create a new `entity.py` for each new entity (replacing entity with the name) and define the attributes according to [SQLAlchemy 2.0 standards](https://docs.sqlalchemy.org/en/20/orm/mapping_styles.html#orm-mapping-styles): + +> **Warning** +> Note that since it inherits from `Base`, the new model is mapped as a python `dataclass`, so optional attributes (arguments with a default value) should be defined after required attributes. + ```python from sqlalchemy import String, DateTime from sqlalchemy.orm import Mapped, mapped_column, relationship