-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a641c25
commit 197d3e1
Showing
8 changed files
with
107 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
group=org.babyfish.jimmer | ||
version=0.9.23 | ||
version=0.9.24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
project/jimmer-core/src/main/resources/META-INF/jimmer/code_generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.9.23 | ||
0.9.24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
export org.babyfish.jimmer.sql.kt.model.inheritance.Administrator | ||
-> package org.babyfish.jimmer.sql.kt.model.inheritance.dto | ||
|
||
import com.fasterxml.jackson.annotation.JsonFormat | ||
|
||
static input AdministratorInputForIssue684 { | ||
fuzzy metadata { | ||
name | ||
} | ||
} | ||
|
||
input AdministratorInputForIssue819 { | ||
#allScalars | ||
|
||
@JsonFormat(pattern = "yyyy/MM/dd HH-mm-ss") | ||
createdTime | ||
|
||
@JsonFormat(pattern = "yyyy/MM/dd HH-mm-ss") | ||
modifiedTime | ||
} |
28 changes: 0 additions & 28 deletions
28
...otlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/dto/AdministratorInputForIssue684Test.kt
This file was deleted.
Oops, something went wrong.
65 changes: 65 additions & 0 deletions
65
...immer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/dto/AdministratorInputTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package org.babyfish.jimmer.sql.kt.dto | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule | ||
import org.babyfish.jimmer.sql.kt.common.assertContent | ||
import org.babyfish.jimmer.sql.kt.model.inheritance.dto.AdministratorInputForIssue684 | ||
import org.babyfish.jimmer.sql.kt.model.inheritance.dto.AdministratorInputForIssue819 | ||
import org.junit.Test | ||
import java.time.LocalDateTime | ||
import java.time.format.DateTimeFormatter | ||
import kotlin.test.expect | ||
|
||
class AdministratorInputTest { | ||
|
||
@Test | ||
fun testNullForIssue684() { | ||
expect( | ||
"{}" | ||
) { | ||
AdministratorInputForIssue684().toEntity().toString() | ||
} | ||
} | ||
|
||
@Test | ||
fun testNonNullForIssue684() { | ||
expect( | ||
"{\"metadata\":{\"name\":\"Metadata\"}}" | ||
) { | ||
AdministratorInputForIssue684( | ||
metadata = AdministratorInputForIssue684.TargetOf_metadata("Metadata") | ||
).toEntity().toString() | ||
} | ||
} | ||
|
||
@Test | ||
fun testIssueFor819() { | ||
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss") | ||
val mapper = ObjectMapper().registerModule(JavaTimeModule()) | ||
val input = AdministratorInputForIssue819( | ||
id = 10L, | ||
name = "SuperAdmin", | ||
createdTime = LocalDateTime.parse("2024-12-02 13:07:24", formatter), | ||
modifiedTime = LocalDateTime.parse("2024-12-03 02:00:14", formatter), | ||
) | ||
val json = mapper.writeValueAsString(input) | ||
assertContent( | ||
"""{" | ||
|--->id":10, | ||
|--->"name":"SuperAdmin", | ||
|--->"createdTime":"2024/12/02 13-07-24", | ||
|--->"modifiedTime":"2024/12/03 02-00-14" | ||
|}""".trimMargin(), | ||
json | ||
) | ||
val input2 = mapper.readValue(json, AdministratorInputForIssue819::class.java) | ||
assertContent( | ||
"""AdministratorInputForIssue819( | ||
|--->id=10, | ||
|--->name=SuperAdmin, | ||
|--->createdTime=2024-12-02T13:07:24, | ||
|--->modifiedTime=2024-12-03T02:00:14)""".trimMargin(), | ||
input2 | ||
) | ||
} | ||
} |