add default exceptions to relations, test one argument, test querysetproxy, test deeply nested
This commit is contained in:
10
README.md
10
README.md
@ -437,8 +437,8 @@ metadata.drop_all(engine)
|
||||
* `bulk_update(objects: List[Model], columns: List[str] = None) -> None`
|
||||
* `delete(each: bool = False, **kwargs) -> int`
|
||||
* `all(**kwargs) -> List[Optional[Model]]`
|
||||
* `filter(**kwargs) -> QuerySet`
|
||||
* `exclude(**kwargs) -> QuerySet`
|
||||
* `filter(*args, **kwargs) -> QuerySet`
|
||||
* `exclude(*args, **kwargs) -> QuerySet`
|
||||
* `select_related(related: Union[List, str]) -> QuerySet`
|
||||
* `prefetch_related(related: Union[List, str]) -> QuerySet`
|
||||
* `limit(limit_count: int) -> QuerySet`
|
||||
@ -453,7 +453,7 @@ metadata.drop_all(engine)
|
||||
#### Relation types
|
||||
|
||||
* One to many - with `ForeignKey(to: Model)`
|
||||
* Many to many - with `ManyToMany(to: Model, through: Model)`
|
||||
* Many to many - with `ManyToMany(to: Model, Optional[through]: Model)`
|
||||
|
||||
#### Model fields types
|
||||
|
||||
@ -491,8 +491,8 @@ The following keyword arguments are supported on all field types.
|
||||
All fields are required unless one of the following is set:
|
||||
|
||||
* `nullable` - Creates a nullable column. Sets the default to `None`.
|
||||
* `default` - Set a default value for the field.
|
||||
* `server_default` - Set a default value for the field on server side (like sqlalchemy's `func.now()`).
|
||||
* `default` - Set a default value for the field. **Not available for relation fields**
|
||||
* `server_default` - Set a default value for the field on server side (like sqlalchemy's `func.now()`). **Not available for relation fields**
|
||||
* `primary key` with `autoincrement` - When a column is set to primary key and autoincrement is set on this column.
|
||||
Autoincrement is set by default on int primary keys.
|
||||
* `pydantic_only` - Field is available only as normal pydantic field, not stored in the database.
|
||||
|
||||
Reference in New Issue
Block a user