Skip to content

Commit

Permalink
general/architecture: Add code smell for skinny models
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Nov 24, 2023
1 parent b19ac40 commit 3d1699e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/general/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ Fat models
----------

If a function performs `CRUD operations <https://en.wikipedia.org/wiki/Create,_read,_update_and_delete>`__ and accepts only a database session and instance values as arguments, add this function as a method on the model's class.

`Code smells <https://en.wikipedia.org/wiki/Code_smell>`__ for skinny models:

- Calling database session methods outside a model's class (for example, ``COMMIT``)

0 comments on commit 3d1699e

Please sign in to comment.