Skip to content

Commit

Permalink
Exposed 0.39.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Aug 1, 2022
1 parent 2a5f55c commit 4d22e98
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package org.jetbrains.exposed.gradle

import com.avast.gradle.dockercompose.ComposeExtension
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.getByName

private inline fun <reified T : Any> Project.extByName(name: String): T = extensions.getByName<T>(name)
Expand Down
4 changes: 2 additions & 2 deletions exposed-bom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Bill of Materials for all Exposed modules
<dependency>
<groupId>org.jetbrains.exposed</groupId>
<artifactId>exposed-bom</artifactId>
<version>0.38.2</version>
<version>0.39.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -51,7 +51,7 @@ repositories {
}

dependencies {
implementation(platform("org.jetbrains.exposed:exposed-bom:0.38.2"))
implementation(platform("org.jetbrains.exposed:exposed-bom:0.39.1"))
implementation("org.jetbrains.exposed", "exposed-core")
implementation("org.jetbrains.exposed", "exposed-dao")
implementation("org.jetbrains.exposed", "exposed-jdbc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DefaultsTest : DatabaseTestsBase() {
class DBDefault(id: EntityID<Int>) : IntEntity(id) {
var field by TableWithDBDefault.field
var t1 by TableWithDBDefault.t1
val clientDefault by TableWithDBDefault.clientDefault
var clientDefault by TableWithDBDefault.clientDefault

override fun equals(other: Any?): Boolean {
return (other as? DBDefault)?.let { id == it.id && field == it.field && equalDateTime(t1, it.t1) } ?: false
Expand Down Expand Up @@ -98,6 +98,23 @@ class DefaultsTest : DatabaseTestsBase() {
}
}

@Test
fun testDefaultsCanBeOverridden() {
withTables(TableWithDBDefault) {
TableWithDBDefault.cIndex = 0
val db1 = DBDefault.new { field = "1" }
val db2 = DBDefault.new { field = "2" }
db1.clientDefault = 12345
flushCache()
assertEquals(12345, db1.clientDefault)
assertEquals(1, db2.clientDefault)
assertEquals(2, TableWithDBDefault.cIndex)

flushCache()
assertEquals(12345, db1.clientDefault)
}
}

private val initBatch = listOf<(BatchInsertStatement) -> Unit>(
{
it[TableWithDBDefault.field] = "1"
Expand Down
4 changes: 2 additions & 2 deletions exposed-spring-boot-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This starter will give you the latest version of [Exposed](https://github.com/Je
<dependency>
<groupId>org.jetbrains.exposed</groupId>
<artifactId>exposed-spring-boot-starter</artifactId>
<version>0.38.2</version>
<version>0.39.1</version>
</dependency>
</dependencies>
```
Expand All @@ -28,7 +28,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.38.2'
implementation 'org.jetbrains.exposed:exposed-spring-boot-starter:0.39.1'
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.parallel=false
org.gradle.jvmargs=-Dfile.encoding=UTF-8
#
group=org.jetbrains.exposed
version=0.38.2
version=0.39.1

0 comments on commit 4d22e98

Please sign in to comment.