PonyORM v0.7.3 Release Notes
Release Date: 2017-10-23 // over 6 years ago-
๐ New features
where()
method added to querycoalesce()
function addedbetween(x, a, b)
function added- #295: Add
_table_options_
for entity class to specify engine, tablespace, etc. - ๐ Make debug flag thread-local
sql_debugging
context manager addedsql_debug
and show_values arguments to db_session addedset_sql_debug
function added as alias to (to be deprecated)sql_debug
function- ๐ Allow
db_session
to acceptddl
parameter when used as context manager - โ Add
optimistic=True
option to db_session - Skip optimistic checks for queries in
db_session
withserializable=True
fk_name
option added for attributes in order to specify foreign key name- โฑ #280: Now it's possible to specify
timeout
option, as well as pass other keyword arguments forsqlite3.connect
function - โ Add support of explicit casting to int in queries using
int()
function - โ Added modulo division % native support in queries
๐ Bugfixes
- ๐ Fix bugs with composite table names
- ๐ Fix invalid foreign key & index names for tables which names include schema name
- For queries like
select(x for x in MyObject if not x.description)
add "OR x.info IS NULL" for nullable string columns - โ Add optimistic checking for
delete()
method - โก๏ธ Show updated attributes when
OptimisticCheckError
is being raised - ๐ Fix incorrect aliases in nested queries
- ๐ป Correctly pass exception from user-defined functions in SQLite
- More clear error messages for
UnrepeatableReadError
- ๐ Fix
db_session(strict=True)
which was broken in 2d3afb2 - ๐ Fixes #170: Problem with a primary key column used as a part of another key
- ๐ Fixes #223: incorrect result of
getattr(entity, attrname)
when the same lambda applies to different entities - ๐ Fixes #266: Add handler to
"pony.orm"
logger does not work - ๐ Fixes #278: Cascade delete error: FOREIGN KEY constraint failed, with complex entity relationships
- ๐ Fixes #283: Lost Json update immediately after object creation
- ๐ Fixes #284:
query.order_by()
orders Json numbers like strings - ๐ Fixes #288: Expression text parsing issue in Python 3
- ๐ Fixes #293: translation of if-expressions in expression
- ๐ Fixes #294: Real stack traces swallowed within IPython shell
Collection.count()
method should check if session is alive- Set
obj._session_cache_
to None after exiting from db session for better garbage collection - ๐ Unload collections which are not fully loaded after exiting from db session for better garbage collection
- Raise on unknown options for attributes that are part of relationship