PonyORM v0.7.3 Release Notes

Release Date: 2017-10-23 // over 6 years ago
  • ๐Ÿ†• New features

    • where() method added to query
    • coalesce() function added
    • between(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 added
    • sql_debug and show_values arguments to db_session added
    • set_sql_debug function added as alias to (to be deprecated) sql_debug function
    • ๐Ÿ‘ Allow db_session to accept ddl parameter when used as context manager
    • โž• Add optimistic=True option to db_session
    • Skip optimistic checks for queries in db_session with serializable=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 for sqlite3.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