Skip to content

Commit ff7bdb1

Browse files
authored
Merge pull request #19 from igormagalhaesr/igormagalhaesr-patch-1
Update README.md
2 parents 981a2a9 + 9dd4ae3 commit ff7bdb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ Create the new entities and relationships and add them to the model
309309

310310
### 9.3 SQLAlchemy Model
311311
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):
312+
313+
> **Warning**
314+
> 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.
315+
312316
```python
313317
from sqlalchemy import String, DateTime
314318
from sqlalchemy.orm import Mapped, mapped_column, relationship

0 commit comments

Comments
 (0)