Skip to content

Releases: ormar-orm/ormar

Add multi columns non unique index and sql_nullable property. Important performance boost with relation map.

13 Sep 14:18
14b1700

Choose a tag to compare

0.10.19

✨ Features

  • Add support for multi-column non-unique IndexColumns in Meta.constraints #307
  • Add sql_nullable field attribute that allows to set different nullable setting for pydantic model and for underlying sql column #308

🐛 Fixes

  • Enable caching of relation map to increase performance #337
  • Clarify and fix documentation in regard of nullable fields #339

💬 Other

  • Bump supported databases version to <=5.2.

Bug fixes

01 Sep 10:13
bccc47f

Choose a tag to compare

0.10.18

🐛 Fixes

  • Fix order of fields in pydantic models #328
  • Fix databases 0.5.0 support #142

Add overwrite for pydantic field, support sqlalchemy >=1.4

30 Aug 07:55
47f2d61

Choose a tag to compare

0.10.17

✨ Features

  • Allow overwriting the default pydantic type for model fields #312
  • Add support for sqlalchemy >=1.4 (requires databases >= 0.5.0) #142

SmallInterger field type, ability to pass own pydantic config

06 Aug 14:11
5bd7b66

Choose a tag to compare

0.10.16

✨ Features

🐛 Fixes

  • Fix generating openapi schema by removing obsolete pydantic field parameters that were directly exposed in schema #291
  • Fix unnecessary warning for auto generated through models #295

Bug fixes

21 Jul 12:44
6d0e991

Choose a tag to compare

0.10.15

🐛 Fixes

  • Fix generating pydantic models tree with nested models (by @pawamoy - thanks!) #278
  • Fix missing f-string in warning about missing primary key field #274
  • Fix passing foreign key value as relation (additional guard, fixed already in the latest release) #270

Improve dates handling and postgres dependencies

06 Jul 13:26
4abd86c

Choose a tag to compare

0.10.14

✨ Features

  • Allow passing timezone:bool = False parameter to DateTime and Time fields for timezone aware database columns #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

🐛 Fixes

  • Fix dependencies from psycopg2 to psycopg2-binary #255

Fix inherited pk and add field accessor access to relations

25 Jun 11:42
aa2df39

Choose a tag to compare

0.10.13

✨ Features

  • Allow passing field accessors in select_related and prefetch_related aka. python style select_related #225.
    • Previously:
      await Post.objects.select_related(["author", "categories"]).get()
      await Author.objects.prefetch_related("posts__categories").get()
    • Now also:
      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

Bug fixes

22 Jun 11:33
cc76e9b

Choose a tag to compare

0.10.12

🐛 Fixes

  • Fix QuerySet.create method not using init (if custom provided) #245
  • Fix ForwardRef ManyToMany relation setting wrong pydantic type #250

Get raw data with values and values_list

08 Jun 15:29
5316306

Choose a tag to compare

0.10.11

✨ Features

  • Add values and values_list to QuerySet and QuerysetProxy that allows to return raw data from query #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

Generating pydantic models tree and exclude_parent_fields

02 Jun 11:17
85c5b79

Choose a tag to compare

0.10.10

✨ Features

  • Add 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 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
  • Fix not saving child object on reverse side of the relation if not saved before #216

💬 Other

  • Expand 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.