From 9dd4ae35423e041089247f92d60e6d675c559235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Magalh=C3=A3es?= <43156212+igormagalhaesr@users.noreply.github.com> Date: Mon, 23 Oct 2023 23:34:34 -0300 Subject: [PATCH] Update README.md dataclass warning added, smaller logo --- README.md | 4 ++++ 1 file changed, 4 insertions(+) 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