From 934f48bebfc44abcd1032a6fd5d7521033b47218 Mon Sep 17 00:00:00 2001 From: bog-walk <82039410+bog-walk@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:35:50 -0400 Subject: [PATCH] chore: Bump Exposed version from 0.43.0 to 0.44.0 (#1869) * chore: Bump Exposed version from 0.43.0 to 0.44.0 Add 0.44.0 changes to ChangeLog.md Add 0.44.0 breaking changes to BREAKING_CHANGES.md Add line about Spring modules now requiring jdk 17. --- README.md | 42 ++++++++-------- docs/BREAKING_CHANGES.md | 39 +++++++++++++++ docs/ChangeLog.md | 49 +++++++++++++++++++ .../Writerside/topics/Getting-Started.md | 8 +-- .../topics/Modules-Documentation.md | 42 ++++++++-------- exposed-bom/README.md | 4 +- exposed-spring-boot-starter/README.md | 6 +-- gradle.properties | 2 +- samples/exposed-ktor/gradle.properties | 2 +- samples/exposed-spring/gradle.properties | 2 +- 10 files changed, 142 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 921b0f95e7..51a6ac8f9d 100644 --- a/README.md +++ b/README.md @@ -79,52 +79,52 @@ repositories { org.jetbrains.exposed exposed-core - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-crypt - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-dao - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-java-time - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-jdbc - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-jodatime - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-json - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-kotlin-datetime - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-money - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-spring-boot-starter - 0.43.0 + 0.44.0 @@ -134,20 +134,20 @@ repositories { ```groovy dependencies { - implementation 'org.jetbrains.exposed:exposed-core:0.43.0' - implementation 'org.jetbrains.exposed:exposed-crypt:0.43.0' - implementation 'org.jetbrains.exposed:exposed-dao:0.43.0' - implementation 'org.jetbrains.exposed:exposed-jdbc:0.43.0' + implementation 'org.jetbrains.exposed:exposed-core:0.44.0' + implementation 'org.jetbrains.exposed:exposed-crypt:0.44.0' + implementation 'org.jetbrains.exposed:exposed-dao:0.44.0' + implementation 'org.jetbrains.exposed:exposed-jdbc:0.44.0' - implementation 'org.jetbrains.exposed:exposed-jodatime:0.43.0' + implementation 'org.jetbrains.exposed:exposed-jodatime:0.44.0' // or - implementation 'org.jetbrains.exposed:exposed-java-time:0.43.0' + implementation 'org.jetbrains.exposed:exposed-java-time:0.44.0' // or - implementation 'org.jetbrains.exposed:exposed-kotlin-datetime:0.43.0' + implementation 'org.jetbrains.exposed:exposed-kotlin-datetime:0.44.0' - implementation 'org.jetbrains.exposed:exposed-json:0.43.0' - implementation 'org.jetbrains.exposed:exposed-money:0.43.0' - implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.43.0' + implementation 'org.jetbrains.exposed:exposed-json:0.44.0' + implementation 'org.jetbrains.exposed:exposed-money:0.44.0' + implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.44.0' } ``` @@ -178,7 +178,7 @@ dependencies { and in `gradle.properties` ``` -exposedVersion=0.43.0 +exposedVersion=0.44.0 ``` ## Samples diff --git a/docs/BREAKING_CHANGES.md b/docs/BREAKING_CHANGES.md index 65bc4fd115..f8e7c3fcf8 100644 --- a/docs/BREAKING_CHANGES.md +++ b/docs/BREAKING_CHANGES.md @@ -1,5 +1,44 @@ # Breaking Changes +## 0.44.0 + +* `SpringTransactionManager` no longer extends `DataSourceTransactionManager`; instead, it directly extends `AbstractPlatformTransactionManager` while retaining the previous basic functionality. + The class also no longer implements the Exposed interface `TransactionManager`, as transaction operations are instead delegated to Spring. + These changes ensure that Exposed's underlying transaction management no longer interferes with the expected behavior of Spring's transaction management, for example, + when using nested transactions or with `@Transactional` elements like `propagation` or `isolation`. + + If integration still requires a `DataSourceTransactionManager`, please add two bean declarations to the configuration: one for `SpringTransactionManager` and one for `DataSourceTransactionManager`. + Then define a composite transaction manager that combines these two managers. + + If `TransactionManager` functions were being invoked by a `SpringTransactionManager` instance, please replace these calls with the appropriate Spring annotation + or, if necessary, by using the companion object of `TransactionManager` directly (for example, `TransactionManager.currentOrNull()`). +* `spring-transaction` and `exposed-spring-boot-starter` modules now use Spring Framework 6.0 and Spring Boot 3.0, which require Java 17 as a minimum version. +* A table that is created with a keyword identifier (a table or column name) now logs a warning that the identifier's case may be lost when it is automatically quoted in generated SQL. + This primarily affects H2 and Oracle, both of which support folding identifiers to uppercase, and PostgreSQL, which folds identifiers to lower case. + + To remove these warnings and to ensure that the keyword identifier sent to the database matches the exact case used in the Exposed table object, please set `preserveKeywordCasing = true` in `DatabaseConfig`: +```kotlin +object TestTable : Table("table") { + val col = integer("select") +} + +// without opt-in (default set to false) +// H2 generates SQL -> CREATE TABLE IF NOT EXISTS "TABLE" ("SELECT" INT NOT NULL) + +// with opt-in +Database.connect( + url = "jdbc:h2:mem:test", + driver = "org.h2.Driver", + databaseConfig = DatabaseConfig { + @OptIn(ExperimentalKeywordApi::class) + preserveKeywordCasing = true + } +) +// H2 generates SQL -> CREATE TABLE IF NOT EXISTS "table" ("select" INT NOT NULL) +``` + +**Note:** `preserveKeywordCasing` is an experimental flag and requires `@OptIn`. It may become deprecated in future releases and its behavior when set to `true` may become the default. + ## 0.43.0 * In all databases except MySQL, MariaDB, and SQL Server, the `ubyte()` column now maps to data type `SMALLINT` instead of `TINYINT`, which allows the full range of diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 25aaded0b0..0630a53d61 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -1,3 +1,52 @@ +# 0.44.0 +Infrastructure: +* Kotlin 1.9.10 +* Kotlin Coroutines 1.7.3 +* log4j2 2.20.0 +* h2-database driver 2.2.220 +* MariaDB driver 2.7.9 and 3.1.4 +* MySQL driver 8.0.30 +* PostgreSQL driver 42.6.0 +* SQLite driver 3.43.0.0 +* Spring Framework 6.0.11 +* Spring Boot 3.1.3 + +Breaking changes: +* `SpringTransactionManager` no longer extends `DataSourceTransactionManager`; instead, it directly extends `AbstractPlatformTransactionManager`. + The class also no longer implements the Exposed interface `TransactionManager`, as transaction operations are instead delegated to Spring. +* `spring-transaction` and `exposed-spring-boot-starter` modules now use Spring Framework 6.0 and Spring Boot 3.0, which require Java 17 as a minimum version. +* A table that is created with a keyword identifier now logs a warning that the identifier's case may be lost when it is automatically quoted in generated SQL. + `DatabaseConfig` now includes the property `preserveKeywordCasing`, which can be set to `true` to remove these warnings and to ensure that the identifier matches the exact case used. +* More details at [Breaking changes](BREAKING_CHANGES.md#0440) + +Features: +* feat!: EXPOSED-109 Improve implementation of Spring transaction manager by @FullOfOrange in https://github.com/JetBrains/Exposed/pull/1840 +* feat: EXPOSED-78 Support database-generated values for columns by @joc-a in https://github.com/JetBrains/Exposed/pull/1844 +* feat: EXPOSED-188 Support Propagation in SpringTransactionManager by @FullOfOrange in https://github.com/JetBrains/Exposed/pull/1867 + +Bug fixes: +* docs: EXPOSED-159 Add KDocs for EntityClass reference functions by @bog-walk in https://github.com/JetBrains/Exposed/pull/1848 +* fix: EXPOSED-158 avoid SQL syntax error of CASE WHEN using nested CASE by @ymotchi in https://github.com/JetBrains/Exposed/pull/1847 +* Fix how changes are calculated for non-default schema table by @AlexeySoshin in https://github.com/JetBrains/Exposed/pull/1678 +* fix: Fix tables creation depending on each other via foreignKey constraint by @naftalmm in https://github.com/JetBrains/Exposed/pull/1649 +* fix: Verbose logging in test module by @Hakky54 in https://github.com/JetBrains/Exposed/pull/1852 +* fix: EXPOSED-161 SQL Server syntax incorrectly allows CASCADE with dropSchema by @bog-walk in https://github.com/JetBrains/Exposed/pull/1850 +* chore: Reuse Containers in tests; Add Test parameters by @e5l in https://github.com/JetBrains/Exposed/pull/1853 +* docs: EXPOSED-124 Add Spring Boot samples by @FullOfOrange in https://github.com/JetBrains/Exposed/pull/1826 +* fix: EXPOSED-117 Set jvmToolchain to 8 for all modules by @e5l in https://github.com/JetBrains/Exposed/pull/1855 +* chore: Adjust test md files by @joc-a in https://github.com/JetBrains/Exposed/pull/1857 +* fix: EXPOSED-162 SQLite generatedKeys exception by @joc-a in https://github.com/JetBrains/Exposed/pull/1854 +* fix: Unable to download required toolchain on MAC by @joc-a in https://github.com/JetBrains/Exposed/pull/1859 +* fix: EXPOSED-171 Switch from spring.factories to AutoConfiguration.imports by @rbraeunlich in https://github.com/JetBrains/Exposed/pull/1645 +* fix: EXPOSED-179 Unsigned column check constraint is not unique to table by @bog-walk in https://github.com/JetBrains/Exposed/pull/1860 +* fix: EXPOSED-182 Schema name breaks Create Table with default column in SQLServer by @bog-walk in https://github.com/JetBrains/Exposed/pull/1861 +* fix: Exception when using RESTRICT reference option by @joc-a in https://github.com/JetBrains/Exposed/pull/1862 +* fix!: EXPOSED-150 Auto-quoted column names change case across databases by @bog-walk in https://github.com/JetBrains/Exposed/pull/1841 +* docs: EXPOSED-132 Add annotations to spring-boot-starter README samples by @bog-walk in https://github.com/JetBrains/Exposed/pull/1856 +* fix: EXPOSED-173 UPDATE_RULE read incorrectly for Oracle by @joc-a in https://github.com/JetBrains/Exposed/pull/1865 +* chore: EXPOSED-186 Replace JDK 1.7 support in exposed-jodatime classes by @bog-walk in https://github.com/JetBrains/Exposed/pull/1866 +* fix: EXPOSED-178 DELETE_RULE read incorrectly for Oracle by @joc-a in https://github.com/JetBrains/Exposed/pull/1868 + # 0.43.0 Infrastructure: * Kotlin 1.9.10 diff --git a/documentation-website/Writerside/topics/Getting-Started.md b/documentation-website/Writerside/topics/Getting-Started.md index c22c68b931..8dbdaa57b7 100644 --- a/documentation-website/Writerside/topics/Getting-Started.md +++ b/documentation-website/Writerside/topics/Getting-Started.md @@ -18,17 +18,17 @@ org.jetbrains.exposed exposed-core - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-dao - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-jdbc - 0.43.0 + 0.44.0 ]]> @@ -37,7 +37,7 @@ org.jetbrains.exposed exposed-core - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-crypt - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-dao - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-java-time - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-jdbc - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-jodatime - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-json - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-kotlin-datetime - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-money - 0.43.0 + 0.44.0 org.jetbrains.exposed exposed-spring-boot-starter - 0.43.0 + 0.44.0 @@ -150,20 +150,20 @@ Dependencies mapping listed below is similar (by functionality) to the previous ```groovy dependencies { - implementation 'org.jetbrains.exposed:exposed-core:0.43.0' - implementation 'org.jetbrains.exposed:exposed-crypt:0.43.0' - implementation 'org.jetbrains.exposed:exposed-dao:0.43.0' - implementation 'org.jetbrains.exposed:exposed-jdbc:0.43.0' + implementation 'org.jetbrains.exposed:exposed-core:0.44.0' + implementation 'org.jetbrains.exposed:exposed-crypt:0.44.0' + implementation 'org.jetbrains.exposed:exposed-dao:0.44.0' + implementation 'org.jetbrains.exposed:exposed-jdbc:0.44.0' - implementation 'org.jetbrains.exposed:exposed-jodatime:0.43.0' + implementation 'org.jetbrains.exposed:exposed-jodatime:0.44.0' // or - implementation 'org.jetbrains.exposed:exposed-java-time:0.43.0' + implementation 'org.jetbrains.exposed:exposed-java-time:0.44.0' // or - implementation 'org.jetbrains.exposed:exposed-kotlin-datetime:0.43.0' + implementation 'org.jetbrains.exposed:exposed-kotlin-datetime:0.44.0' - implementation 'org.jetbrains.exposed:exposed-json:0.43.0' - implementation 'org.jetbrains.exposed:exposed-money:0.43.0' - implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.43.0' + implementation 'org.jetbrains.exposed:exposed-json:0.44.0' + implementation 'org.jetbrains.exposed:exposed-money:0.44.0' + implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.44.0' } ``` @@ -194,7 +194,7 @@ dependencies { and in `gradle.properties` ``` -exposedVersion=0.43.0 +exposedVersion=0.44.0 ``` ### JDBC driver and logging diff --git a/exposed-bom/README.md b/exposed-bom/README.md index dc81bed054..42765d8d9b 100644 --- a/exposed-bom/README.md +++ b/exposed-bom/README.md @@ -17,7 +17,7 @@ Bill of Materials for all Exposed modules org.jetbrains.exposed exposed-bom - 0.43.0 + 0.44.0 pom import @@ -51,7 +51,7 @@ repositories { } dependencies { - implementation(platform("org.jetbrains.exposed:exposed-bom:0.43.0")) + implementation(platform("org.jetbrains.exposed:exposed-bom:0.44.0")) implementation("org.jetbrains.exposed", "exposed-core") implementation("org.jetbrains.exposed", "exposed-dao") implementation("org.jetbrains.exposed", "exposed-jdbc") diff --git a/exposed-spring-boot-starter/README.md b/exposed-spring-boot-starter/README.md index bd21a5ce27..13353c0b16 100644 --- a/exposed-spring-boot-starter/README.md +++ b/exposed-spring-boot-starter/README.md @@ -18,7 +18,7 @@ This starter will give you the latest version of [Exposed](https://github.com/Je org.jetbrains.exposed exposed-spring-boot-starter - 0.43.0 + 0.44.0 ``` @@ -28,7 +28,7 @@ repositories { mavenCentral() } dependencies { - implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.43.0' + implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.44.0' } ``` ### Gradle Kotlin DSL @@ -44,7 +44,7 @@ dependencies { ``` In `gradle.properties` ```properties -exposedVersion=0.43.0 +exposedVersion=0.44.0 ``` ## Setting up a database connection diff --git a/gradle.properties b/gradle.properties index f6d4415a94..84f9103117 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ org.gradle.configuration.cache=true org.gradle.caching=true group=org.jetbrains.exposed -version=0.43.0 +version=0.44.0 diff --git a/samples/exposed-ktor/gradle.properties b/samples/exposed-ktor/gradle.properties index 9545e773b1..bccd2d7a21 100644 --- a/samples/exposed-ktor/gradle.properties +++ b/samples/exposed-ktor/gradle.properties @@ -2,5 +2,5 @@ ktorVersion=2.3.4 kotlinVersion=1.8.10 logbackVersion=1.2.11 kotlin.code.style=official -exposedVersion=0.43.0 +exposedVersion=0.44.0 h2Version=2.1.214 diff --git a/samples/exposed-spring/gradle.properties b/samples/exposed-spring/gradle.properties index 344ee125f6..3ad0d3cb13 100644 --- a/samples/exposed-spring/gradle.properties +++ b/samples/exposed-spring/gradle.properties @@ -1,2 +1,2 @@ -exposedVersion=0.43.0 +exposedVersion=0.44.0 kotlinVersion=1.8.21