- Rebase changes from 0.7.10 and 0.7.11
- Rework Relation & RelatedList so the return value is still a list instance
- Flatten builtin enum.Enum types to their value
- Add first, last, earliest, latest to QuerySet and support Meta get_latest_by
- Support using
_id
as alias to the primary key when doing filtering
- breaking Make
Relation
return a RelatedList withsave
andload
methods. - Don't rewrite bytecode
- Pass onclause when using join to prevent sqlalchemy from picking incorrect relation
- Fix select_related with duplicate joins (eg
select_related('a', 'a__b')
) - Change Enum database name to include the table name
- Add builtin set / tuple support for JSONModel
- Support doing an or filter using django style queries by passing a dict arg
- Add group by
- Fix error with 3.11
- Fix problem with flatten/unflatten creating invalid columns.
- Return from bulk_create if values list is empty
- Fix problem with order_by not having bool defined
- Change internal data types to set to speed up building queries and allow caching
- Add a
bulk_create
method to the model manager. - Add
py.typed
to package
- Fix a bug preventing select_related on multiple fields from working
- Add django style
exclude
to filter
- Do not save Property members by default
- Annotate Model
objects
andserializer
withClassVar
- Change import sorting and cleanup errors found with flake8
- Revert force restore items from direct query even if in the cache.
Now queries can accept a
force_restore=True
to do this. See https://en.wikipedia.org/wiki/Isolation_%28database_systems%29
- Support prefetching of one to one "Related" members.
- Remove _id field in base Model and JSONModel as it has no meaning there
- Always force restore items from direct query even if in the cache
- Make prefetch use parent queries connection
- Use generated functions to speed up save and restore
- BREAKING: To save memory (by avoiding overriding members) the
_id
and__ref__
fields were changed to anInt
.
- Fix queries joining through multiple tables
- Add initial implementation of prefetch_related
- Add workaround for subclassed pk handling
- Add support for using multiple databases
- Fix non-abstract subclasses throwing multiple primary key error.
- Make update work with renamed fields
- Merge
composite_indexes
and typing branches
- Add type hints
- Drop python 3.6 support
- Fix bug with renamed fields excluded fields
- Add
composite_indexes
to Model Meta.
- Add
distinct
to queryset
- Add
outer_join
to queryset to allow using a left outer join with select related
- Add builtin JSON serializer for
UUID
- Add builtin JSON serializer for
Decimal
- Add field types for
Decimal
andtimedelta
- Fix bug with enum field name on postgres
- Fix array field with instance child types
- Add support for
update_fields
on save to only fields specified - Add support for
fields
on load to only load fields specified
- Add support for table database
triggers
. See https://docs.sqlalchemy.org/en/14/core/ddl.html - Fix bug in create_table where errors are not raised
- Add
update
method usingModel.objects.update(**values)
- Replace usage of Unicode with Str to support atom 0.6.0
- Change order by to use
-
as desc instead of~
- Add default constraint naming conventions https://alembic.sqlalchemy.org/en/latest/naming.html#the-importance-of-naming-constraints
- Allow setting a
constraints
list on the ModelMeta
class - Fix issue with
connection
arg not working properly when filtering
- Refactor SQL queries so they can be chained
ex
Model.objects.filter(name="Something").filter(age__gt=18)
- Add
order_by
,limit
, andoffset
, slicing, andexists
- Support filtering using django-style reverse foreign key lookups,
ex
Model.objects.filter(groups_in=[group1, group2])
- Refactor count to support counting over joins
- Let a member be tagged with a custom
flatten
function
- Fix bug in SQLModel load using
_id
which is not a valid field
- Let a member be tagged with a custom
unflatten
function
- Properly restore JSONModel instances that have no
__model__
in the dict when migrated from a dict or regular JSON field.
- Add a
__restored__
member to models and aload
method so foreign keys do not restore as None if not in the cache. - Update to support atom 0.5.0
- Add
cache
option to SQLModelManager to determine if restoring should always be done even if the object is in the cache.
- Set column type to json if the type is a JSONModel subclass
- Fix bug when saving using a generated id
- Change setstate to restorestate to not conflict with normal pickleing
- Support lookups on foreign key fields
- Add ability to specify
get_column
andget_column_type
to letatom.catom.Member
subclasses use custom sql columns if needed.
- Support lookups using renamed column fields
- The create and drop have been renamed to
create_table
anddrop_table
respectively. - Add a shortcut
SomeModel.object.create(**state)
method - Allow passing a db connection to manager methods ( get, get_or_create, filter, delete, etc...) to better support transactions
- Fix the nosql serialization registry not being loaded properly
- Fix packaging issue with 0.2.2
- Fix bug with fk types
- Allow passing Model instances as filter parameters #8 by @youpsla
- Add a JSONModel that simply can be serialized and restored using JSON.
- Add ability to set an SQL model as
abstract
so that no sqlalchemy table is created.
- Initial release