From af809714aa709f8abda630f11e48c9a2f93dfd3e Mon Sep 17 00:00:00 2001 From: collerek Date: Mon, 5 Oct 2020 10:13:09 +0200 Subject: [PATCH] update readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f7373a8..cb31386 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Ormar is built with: Because ormar is built on SQLAlchemy core, you can use [`alembic`][alembic] to provide database migrations. -The goal was to create a simple ORM that can be used directly with [`fastapi`][fastapi] that bases it's data validation on pydantic. +The goal was to create a simple ORM that can be used directly (as request and response models) with [`fastapi`][fastapi] that bases it's data validation on pydantic. Initial work was inspired by [`encode/orm`][encode/orm], later I found `ormantic` and used it as a further inspiration. The encode package was too simple (i.e. no ability to join two times to the same table) and used typesystem for data checks. @@ -408,9 +408,9 @@ await Product.objects.create(name="Mars", company="Mars") ``` -Since version >=0.3.6 Ormar supports selecting subset of model columns to limit the data load +Since version >=0.3.6 Ormar supports selecting subset of model columns to limit the data load. Warning - mandatory fields cannot be excluded as it will raise validation error, to exclude a field it has to be nullable. -pkcolumn cannot be excluded - it's always auto added +Pk column cannot be excluded - it's always auto added even if not explicitly included. ```python import databases import pydantic @@ -518,6 +518,7 @@ Available Model Fields (with required args - optional ones in docs): * `JSON()` * `BigInteger()` * `Decimal(scale, precision)` +* `UUID()` * `ForeignKey(to)` * `Many2Many(to, through)`