27 KiB
0.20.3
Features:
sizeproperty added forColumnMetadata(#748). Thank you, kenta.koyama.
Bug fixes:
- Can't load implementation for DatabaseConnectionAutoRegistration (#748).
- Proper length check when using Unicode strings (#743). PR from pt2121, thank you.
- Custom enumeration not working with default value (#750)
- [SQLite] fixing a bug that happens when creating table with autoInc column and custom primarykey constraint name (#755). Fixed by hichem-fazai.
- Flushing a new entity fails with an exception (#761)
- Update event wasn't fired on Entity.flush() (#764)
0.20.2
Bug fixes:
- Predefined
IntIdTable/LongIdTable/UUIDTableshould respect deprecated primaryKey declaration.
0.20.1
Features:
- New way to define primary keys on tables were implemented by hichem-fazai to support custom primary key constraint keys.
If have to use
override val primaryKey: PrimaryKey?on your table if you want to define a custom name. For all users of predefinedIntIdTable/LongIdTable/UUIDTablenothing changed. OldColumn.primaryKeyfunction was depricated and will be removed in the future releases. java.time.Instantsupported withtimestampcolumn type (exposed-java-timemodule only) (#724). Many thanks to Lukáš Křečan.- Support for unsized binary columns (Oracle and PostgreSQL dialects) (#716). Another great PR from hichem-fazai.
- A unique identifier for
Transactioninstance introduced and supported in EntityHooks/EntityEvents by mpe85.
Bug fixes:
- Annoying
NoSuchElementExceptionfrom 0.19.3 fixed by Toshiaki Kameyama (#731) - Prevent defining duplicated column name in a table. Now you will get
DuplicateColumnExceptionat runtime (#709). Nice work hichem-fazai! batchInsertwill throwBatchDataInconsistentExceptioninstead ofNoSuchElementExceptionwhen it wasn't possible to make insertion (#741).
0.19.3
Deprecations:
Query.orderBy()functions with boolean sort parameter were removed
Bug fixes:
- NoSuchElementException: List is empty on updating not flushed entities (#708)
- Replace function fails on H2 in MySQL mode when using pool
- Delayed DAO update flush causes unique constraint violation (#717)
Query.empty()shouldn't add LIMIT 1 if query is marked as forUpdate() (#684)
0.19.1
Broken changes:
EntityID,IdTable,IntIdTable,LongIdTable,UUIDTableclasses fromexposed-corewere moved fromorg.jetbrains.exposed.daotoorg.jetbrains.exposed.dao.idpackage along withexposed-jodatimemodule classes to support Java 9 module system. To help with migration, old classes were deprecated with properreplaceWithoption. Read migration guide for more details.
Features:
selectBatchedandselectAllBatchedfunctions added to make queries in batches (#642). Many thanks to Pin-Sho Feng for a PR.- Added UpdateBuilder.update expression builder version (#700). Another useful PR from spand
- New SQL datetime functions year, day, hour, minute, second (#707). Helpful PR from hichem-fazai
Bug fixes:
- SpringTransactionManager doesn't properly rollback transactions in some cases (#666)
- Compilation error Field name 'Oracle12+' cannot be represented in dex format. (#668)
- Enable comparing(less/lessEq/greater/greaterEq) to nullable column (#694). Thank you Toshiaki Kameyama.
- Fixed insert statements with expression as a value.
- Do not load related entities multiple times when using eager loading with the same entities. Small but useful fix from kenta.koyama
- Failed on create a FK for a table created in another database schema (#701)
0.18.1
Major changes:
- New modules model. For more details please read dependencies section and migration guide in wiki.
- Java 8 Time API support
0.17.7
Deprecations:
- Remove deprecated Expression.toSQL
newSuspendedTransactionAsyncnow returnsDeferredinstead ofTransactionResult(which was removed completely)TransactionResult.andThenfunction was removed
Features:
Bug fixes:
- [Coroutines] newSuspendedTransaction captures outer transaction and then close it before return to outer block
- [Coroutines] IllegalArgumentException thrown when List<Deferred>.awaitAll() is used on List<TransactionResult> (#658)
- identifierLengthLimit should not be lazy initialized
- Immutable entities wasn't invalidated in some cases (#665). PR from Dmitry Dolzhenko.
- Rework resolving auto increment type to handle own ColumnType implementation (#663). PR from Mateusz Śledź.
- Fixing the
monthbuilt-in function in case of all database dialects (#670). PR from hichem-fazai - Compilation error Field name 'Oracle12+' cannot be represented in dex format. (#668)
- [SQLite] Problem with
autoIncrement()andprimaryKey(). (#649), (#669) - fixes in error logging of expressions.
0.17.6
Critical bug fix:
- Outer transaction wasn't restored after inner transaction failed on exception
Bug fixes:
- ORA-00972: identifier is too long. Oracle 11g (#654)
Features:
- shortParam/shortLiteral, floatParam/floatLiteral, doubleParam/doubleLiteral added (#648)
- Warmup for backReferences via
loadandwithfunctions was supported
0.17.5
Critical bug fix:
- Transaction isolation level wasn't applied to transaction
0.17.4
Critical bug fix:
andfunction executed onAndexpression mutates expression state
Features:
SchemaUtilsfunctions (create/createMissingTablesAndColumns/drop) could be executed withinBatchflag to perform related functions in a single batch (where possible)
Performance:
- Speed up scheme analysis within for MySQL in place where column constraints metadata is required
0.17.3
Infrastructure:
- Kotlin updated to 1.3.50
Features:
- Added
shortcolumn type support backed withSMALLINTSQL type - Added
greater/greaterEq/less/lessEqfunctions with EntityID parameter (#619)
Bug fixes:
- CURRENT_TIMESTAMP/NOW used as DEFAULT were broken for MySQL in some cases (#631. Thanks Saeed Shahrivari for initial PR.
0.17.2
Bug fixes:
- MySQL match function is broken
- notInList function doesn't work with list of EntityID. Thank you kenta.koyama for a PR.
0.17.1
Performance:
- QueryBuilder and Expression were reworked to lower object allocation when preparing SQL.
Important:
This version has a broken change: Expression.toSQL was replaced with Expression.toQueryBuilder.
Difference is what toQueryBuilder doesn't return String representation of an Expression but only register it in a QueryBuilder.
If you need to get raw SQL value please use Expression.toString.
0.16.4
Features:
- Added where in subquery (#610). Kudos to Manabu OHTAKE for PR.
Bug fixes:
- ClassCastException on an attempt to flush IdTable with reference to Table
- Fixed needQuotes check of already quoted identifiers (#614). Thanks mpe85
- Suspend transactions broken when working with multiple databases (#624)
- Unnecessary select when preloading absent references (#615)
- Updates of entities were executed in random order what could lead to unexpected behavior
0.16.3
Features:
- Added
rightJoin,fullJoinandcrossJoinfunctions. Fedor Korotkov thanks for PR.
Bug fixes:
Connection is closederror when used suspended transactions (#601)- Nested transaction partially commits outer transaction since 0.16.1 (#605)
0.16.2
Bug fixes:
Connection is closederror when used suspended transactions (#601)- EntityHooks fails on commit from suspended transactions
TransactionManager.manageris public again (#599)
0.16.1
Features:
- Spring Boot starter for Exposed (#582). Many kudos to Trey Bastian!
- Nested transactions support (#534). Could be enabled via
Database.useNestedTransactionsproperty. Thanks for initial PR to Antanas Arvasevicius. orWherefunction added (#584)neqinfix function onColumn<EntityID<*>>added (#590)
Bug Fixes:
- Build LIMIT only if size is strictly positive (#586)
optReferencefails with type inference when referenced to non-nullable column (#593)- Impossible to use
referencesonColumn<EntityID<*>>(#591)
0.15.1
Features:
suspendedTransactionfunction introduced to work withinsuspendfunctions. See wiki section for more details.- Custom functions support (#581). See wiki section for more details.
Bug Fixes:
- Duplicated columns in the parameter list of slice() caused unexpected value in ResultRow (#581)
0.14.4
Bug Fixes:
0.14.3
Features:
- Now it's possible to create Entities from aliased tables/queries. Corresponded
wrapRow/wrapRowsfunctions were added toEntityClass(#404) - Support for
regexpfunction (both case-sensitive/insensitive) was provided on every database which provided it concatfunction was introduced (#509)
Performance optimizations:
- Unnecessary string escaping in
registerArgumentswas removed when used prepared statements
Infrastructure:
- Mysql 8.0 tests added
- Oracle tests were reanimated
0.14.2
Deprecations:
InsertStatement.generatedKeyfield removed
Features:
likeoperator forColumn<EntityID<String>>(#117)
Bug Fixes:
- SQLServer dialect fails on loading
extraNameCharactersfrom DatabaseMetadata insertIgnorewith get id on result fails for MySQL (#574)- Oracle dialect improvements
Infrastructure:
- Run MySQL tests on MySQL 5.7+ with jdbc driver
8.0.16(#171) - Oracle tests reanimated on Oracle 18 XE
0.14.1
Bug Fixes:
- Fixed support for H2 1.4.198+ (CVE-2018-10054) (#530, #558)
- LazySizedCollection.limit() produce StackOverflowError exception (#569)
- Explicitly specify constraint name in create table statement (PR #570 from vetrovosk)
0.13.7
Kotlin updated to 1.3.31
Deprecation:
loggerfield removed from Transaction (#447)- Deprecated functions removed: wrapRow, createIndex, groupConcat (with boolean order param), join
- enumeration/enumerationByName with Class<*> param removed
Features:
Bug fixes:
- Only warn of schema/db mismatch if its the case. It isn't on left join. (PR #541 from spand)
- Warn full column name in "Column ... is marked as not null" message
- Escape collate in Text and Varchar columns (PR #554 from doyaaaaaken)
- Aliased tables had use their original names in ON part
0.13.6
Feature:
- Attempt to fetch not only autoincrement values but all returned from insert/batchInsert
- New method (
TransactionManger.closeAndUnregister) to close and unregister a database connection (PR #529 from Max Rumpf)
Bug fixes:
- [MySQL] Constraints fails when table names are in lower case (PR #539 from valepakh)
- [H2, SQLite] SchemaUtils.createMissingTablesAndColumns doesn't correctly check constraints (#535)
0.13.5
Bug fixes:
- Initialize client defaults only for target entity table columns (was broken in #0.13.4 with #526
0.13.4
Infrastructure:
- Finished moving to Gradle Kotlin DSL. Many thanks to Thanks for PR goes to Vladislav Tankov (@tanvd).
Deprecation:
InsertStatement.generatedKeyis forbidden to use now in favour toresultValuesandinsertAndGetId
Features:
- InsertStatement.get function was split into get and getOrNull to simplify get use. Thanks for PR goes to Johannes Jensen (@spand)
Bug fixes:
- clientDefault is called multiple times gives incorrect value (#526)
- Fix composite PK bugs (Thanks Aidar Samerkhanov (@Darych) for PR): incorrect evaluation of last column index in PK and missed column description DDL in ALTER TABLE for non H2 databases.
- forUpdate value was ignored in warmUp* functions when was applied to mapLazy/cached references
- Join on two tables with more than one foreign key constraint fails even with additionalConstraint (#522)
0.13.3
Bug fixes:
- Unable to create index on column that also has a foreign key with
createMissingTablesAndColumns, fix for MySQL (#498) - Use memberProperties instead of declaredMemberProperties in with/preloadRelations.
0.13.2
Bug fixes:
- Wrong values returned from warmUp* functions which leads to N + 1
0.13.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)
0.12.2
Kotlin updated to 1.3.21
Features:
- DAO: It's possible to call
orderByonSizedIterableto 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
uniqueidentifierfor UUID columns - Compound operations introduced:
compoundAnd/compoundOr(#469) Op.TRUE/Op.FALSEexpressions 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 generatedexception thrown when trying to insert row to IdTable usinginsertAndGetIdwith explicit id and then make search by returned id (#432)
Deprecations:
- orderBy with boolean sort parameters was deprecated
0.12.1
Features:
- MariaDB support
- Suspending
transactionfunctions (#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
inTopLevelTransactionacceptsDatabaseinstead 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
Entitycreated usingEntityClass.newcausesClassCastException(#464) NoClassDefFoundErrorwhen 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.loggeris prohibited SchemaUtils.createIndexwith columns and isUnique parameters is prohibitedgroupConcatwith boolean sortOrder is replaced with similarSortOrderversionjoinis replaced withinnerJoin- enumeration/enumerationByName with java
Classreplaced with kotlinKClass
0.11.2
- 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)
0.11.1
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)
0.10.5
Features:
- Added
DOUBLEcolumn 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)
wherepart made optional inUPDATEstatement (#115)andWherefunction 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]
ClassCastExceptionwhen reading from VARCHAR column (#369) - Use ::class instead of ::class.java for enumerations (#370)
Previous functions
enumeration/enumerationByNamewere 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
DROPtable (#112) - Entity id is not generated properly when using
clientDefaulton related column (#313) ClassCastExpectionwhen using alias on a expressions (#379)- [MySQL] Entity ids were not generated properly with
rewriteBatchedStatementsflag is on. - [Oracle]
LONGtype replaced withCLOBfor text columns (#382)
0.10.4
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
customEnumerationcolumn 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
0.10.3
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: