Bug fixes: Wrong values returned from warmUp* functions which leads to N + 1
Features:
Bug fixes:
- Unable to create index on column that also has a foreign key with
createMissingTablesAndColumns
(#498) - Using createMissingTablesAndColumns() generates a spurious WARN message in log files (#480)
- Unexpected value of type Int: 26 of org.jetbrains.exposed.dao.EntityID (#501)
- More proper handling of forUpdate/notForUpdate/orderBy on LazySizedCollection
- Problems on comparing binary types (bit from MySQL) (#491)
Kotlin updated to 1.3.21
Features:
- DAO: It's possible to call
orderBy
onSizedIterable
to sort entities (#476) - DSL/DAO: Self join many-to-many relationships (#106). See wiki page for example.
- DSL: Allow to apply groupConcat on expressions (#486). Thanks for PR goes to Edvinas Danevičius (@Edvinas01).
- Log every SQLException thrown inside inTopLevelTransaction with warn instead of info level
- SQLServer dialect will now use
uniqueidentifier
for UUID columns - Compound operations introduced:
compoundAnd
/compoundOr
(#469) Op.TRUE
/Op.FALSE
expressions added- OR operator was optimized to use less braces
- Oracle: Speedup extracting tableColumns metadata
Bug fixes:
- Impossible to set default value with nullable column (#474)
- UUID value not read correctly (#473)
No key generated
exception thrown when trying to insert row to IdTable usinginsertAndGetId
with explicit id and then make search by returned id (#432)
Deprecations:
- orderBy with boolean sort parameters was deprecated
Features:
- MariaDB support
- Suspending
transaction
functions (#418) - DAO: It's possible to specify forUpdate state in warmup* functions
Bug fixes:
- Fixed condition when IllegalStateException should be thrown on LazySizedCollection forUpdate/notForUpdate
inTopLevelTransaction
acceptsDatabase
instead ofTransactionManager
(#448)- LIMIT is not supported in DELETE SQLite message (#455)
- Limit propagate is same entity (#439)
- forIds/forEntityIds wont return partially cached values
- Accessing enum field in
Entity
created usingEntityClass.new
causesClassCastException
(#464) NoClassDefFoundError
when creating table on Android (#461)exec(String)
throwsSQLException: ResultSet already requested
(#414)- SQLite autoincrement table is not created correctly (#328)
Deprecations:
- Deprecate InsertStatement.generatedKey (#424)
- Using of
Transactions.logger
is prohibited SchemaUtils.createIndex
with columns and isUnique parameters is prohibitedgroupConcat
with boolean sortOrder is replaced with similarSortOrder
versionjoin
is replaced withinnerJoin
- enumeration/enumerationByName with java
Class
replaced with kotlinKClass
- Kotlin #1.3.0
- Fixed bug that call for createMissingTablesAndColumns could lead to exception while trying to add an index which already exists in db (MySQL only problem)
Features:
- Support entity references by non-ID column (#282)
- groupConcat function reworked and supported on all databases (except SQLite)
- Now it's possible to create cyclic depended tables in single SchemaUtils.createTable() call. Relates to Defer Foreign references during creation (#384)
- Introduced SchemaUtils.checkCycle() function to check tables for cyclic references
- MOD (%) operator support (#391)
- Set RepetitionAttempts in TransactionManager (to set globally) (#393)
- Fail with KNPE on not null columns with null
- Throw exception when trying to change onUpdate state for loaded LazySizedCollection
- Database.dialect field is now public
Bug fixes:
- BatchUpdateStatement results in IllegalStateException: Table.columnName is already initialized (#386)
- BatchUpdateStatement expects set(..) calls in alphabetical order and fails when given more than 2 batches (#388)
- autoIncrement carries to referencing column (#385)
- Query fails when same column/expression provided in slice multiple times
- columnConstraints() returns wrong map with keys in wrong order (target instead of referee)
- Try to expand Query in ExposedSQLException even if it wasn't able to use current transaction.
- Autoinc column does not necessarily need to be the first column in the table (#398)
- "No transaction in context" when using SpringTransactionManager (#365, #407)
- uuid values are not properly escaped in subquery (#415)
- Foreign Key Constraints being recreated (#394)
Features:
- Added
DOUBLE
column type (#358). Thanks go to Jonathan Shore (@tr8dr). Entity.refresh()
introduced to update its state from database (see kdoc)- All statements classes become open to allowing inheritance (#350)
where
part made optional inUPDATE
statement (#115)andWhere
function introduced to help in constructing complex queries (#375). See "Conditional where" section on Wiki.
Bug fixes:
- Varchar column doesn't validate length / Validate length only before execute update (#300)
- sqlState doesn't available on
ExposedSQLException
(#331) - [SQLite]
ClassCastException
when reading from VARCHAR column (#369) - Use ::class instead of ::class.java for enumerations (#370)
Previous functions
enumeration
/enumerationByName
were deprecated with quick fix to new ones. Both functions will be removed on next releases. - Multiple join produce "DSL SYNTAX ERROR" (#366)
- Entities flush to a database after a
DROP
table (#112) - Entity id is not generated properly when using
clientDefault
on related column (#313) ClassCastExpection
when using alias on a expressions (#379)- [MySQL] Entity ids were not generated properly with
rewriteBatchedStatements
flag is on. - [Oracle]
LONG
type replaced withCLOB
for text columns (#382)
Features:
- ON UPDATE reference constraint added
- All dialects made public and open for extensibility
Transaction.addLogger()
function introduced as replacement tologger.addLogger()
approach- Strings will be validated against column max length before inserting to database (#300)
- Overriding the fetch size for a Query (#327)
Bug fixes:
- Extended sql exception logging available only in debug mode
- [PostgreSQL] Table with
customEnumeration
column doesn't work with Entity/DAO API (#340) - Table with composite key created only with specific prop order (#343)
- allTableNames in VendorDialect returns only from current database (#339)
- "ORA-00972: identifier is too long" on creating table with long name
Features:
- Floating point columns
- Check constraint functionallity (kudos to @SackCastellon)
- Possibility to provide custom names for contraints and indexes (thanks to @mduesterhoeft)
- Added support to delete with limit and offset (thanks @Mon_chi for initial PR)
- Full SQL will be now logged on any SQLException (#288 [Suggestion] Log the SQL query when an exception is thrown)
- Postgres support for ignore + replace
- H2 support for INSERT IGNORE for new H2 version
- Statement interceptors now allow triggering on before commit and rollback
- Database ENUM types supported (read more here)
Bug fixes: