Ormar

Latest version: v0.20.0

Safety actively analyzes 630305 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 14

0.10.15

🐛 Fixes

* Fix generating pydantic models tree with nested models (by pawamoy - thanks!) [278](https://github.com/collerek/ormar/issues/278)
* Fix missing f-string in warning about missing primary key field [274](https://github.com/collerek/ormar/issues/274)
* Fix passing foreign key value as relation (additional guard, fixed already in the latest release) [270](https://github.com/collerek/ormar/issues/270)

0.10.14

✨ Features

* Allow passing `timezone:bool = False` parameter to `DateTime` and `Time` fields for timezone aware database columns [264](https://github.com/collerek/ormar/issues/264)
* Allow passing `datetime`, `date` and `time` for filter on `DateTime`, `Time` and `Date` fields to allow filtering by datetimes instead of converting the filter value to string [79](https://github.com/collerek/ormar/issues/79)

🐛 Fixes

* Fix dependencies from `psycopg2` to `psycopg2-binary` [255](https://github.com/collerek/ormar/issues/255)

0.10.13

✨ Features

* Allow passing field accessors in `select_related` and `prefetch_related` aka. python style `select_related` [225](https://github.com/collerek/ormar/issues/225).
* Previously:
python
await Post.objects.select_related(["author", "categories"]).get()
await Author.objects.prefetch_related("posts__categories").get()

* Now also:
python
await Post.objects.select_related([Post.author, Post.categories]).get()
await Author.objects.prefetch_related(Author.posts.categories).get()


🐛 Fixes

* Fix overwriting default value for inherited primary key [253](https://github.com/collerek/ormar/issues/253)

0.10.12

🐛 Fixes

* Fix `QuerySet.create` method not using init (if custom provided) [245](https://github.com/collerek/ormar/issues/245)
* Fix `ForwardRef` `ManyToMany` relation setting wrong pydantic type [250](https://github.com/collerek/ormar/issues/250)

0.10.11

✨ Features

* Add `values` and `values_list` to `QuerySet` and `QuerysetProxy` that allows to return raw data from query [223](https://github.com/collerek/ormar/issues/223).
* Allow returning list of tuples or list of dictionaries from a query
* Skips parsing the data to ormar model so skips also the validation
* Allow excluding models in between in chain of relations, so you can extract only needed columns
* `values_list` allows you to flatten the result if you extract only one column.

🐛 Fixes

* Fix creation of auto through model for m2m relation with ForwardRef [226](https://github.com/collerek/ormar/issues/226)

0.10.10

✨ Features

* Add [`get_pydantic`](https://collerek.github.io/ormar/models/methods/#get_pydantic) function that allows you to auto generate equivalent pydantic models tree from ormar.Model. This newly generated model tree can be used in requests and responses to exclude fields you do not want to include in the data.
* Add [`exclude_parent_fields`](https://collerek.github.io/ormar/models/inheritance/#exclude_parent_fields) parameter to model Meta that allows you to exclude fields from parent models during inheritance. Note that best practice is to combine models and mixins but if you have many similar models and just one that differs it might be useful tool to achieve that.

🐛 Fixes

* Fix is null filter with pagination and relations (by erichaydel) [214](https://github.com/collerek/ormar/issues/214)
* Fix not saving child object on reverse side of the relation if not saved before [216](https://github.com/collerek/ormar/issues/216)


💬 Other

* Expand [fastapi](https://collerek.github.io/ormar/fastapi) part of the documentation to show samples of using ormar in requests and responses in fastapi.
* Improve the docs in regard of `default`, `ForeignKey.add` etc.

Page 4 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.