Skip to content

Commit 28e9c55

Browse files
committed
Refs #224, closes #224, note about the mandatory __tablename__ field
1 parent 494480c commit 28e9c55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/schema.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ instance. Still the same example rewritten in GINO ORM::
186186
print(await User.query.gino.all())
187187
# Outputs: [<User object at 0x10a8ba860>]
188188

189+
.. important::
190+
191+
The ``__tablename__`` is a mandatory field to define a concrete model.
192+
189193
As you can see, the declaration is pretty much the same as before. Underlying
190194
they are identical, declaring two tables in ``db``. The ``class`` style is just
191195
more declarative. Instead of ``users.c.name``, you can now access the column by

0 commit comments

Comments
 (0)