forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#13829 from evanchooly/issue11887
Validate that Kotlin entities do not extend PanacheEntity and also declare its own ID
- Loading branch information
Showing
22 changed files
with
339 additions
and
244 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
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
25 changes: 0 additions & 25 deletions
25
...uarkus/hibernate/orm/panache/kotlin/deployment/test/DefaultPanacheEntityToStringTest.java
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
...t/src/test/java/io/quarkus/hibernate/orm/panache/kotlin/deployment/test/NoConfigTest.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...nate/orm/panache/kotlin/deployment/test/multiple_pu/DefaultPersistenceUnitConfigTest.java
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...ernate/orm/panache/kotlin/deployment/test/multiple_pu/DefaultPersistenceUnitFileTest.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...te/orm/panache/kotlin/deployment/test/multiple_pu/ErroneousPersistenceUnitConfigTest.java
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...ate/orm/panache/kotlin/deployment/test/multiple_pu/MultiplePersistenceUnitConfigTest.java
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
...quarkus/hibernate/orm/panache/kotlin/deployment/test/multiple_pu/PanacheTestResource.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...o/quarkus/hibernate/orm/panache/kotlin/deployment/test/multiple_pu/first/FirstEntity.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...quarkus/hibernate/orm/panache/kotlin/deployment/test/multiple_pu/second/SecondEntity.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
.../quarkus/hibernate/orm/panache/kotlin/deployment/test/DefaultPanacheEntityToStringTest.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,21 @@ | ||
package io.quarkus.hibernate.orm.panache.kotlin.deployment.test | ||
|
||
import io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity | ||
import org.junit.jupiter.api.Assertions | ||
import org.junit.jupiter.api.Test | ||
|
||
class DefaultPanacheEntityToStringTest { | ||
@Test | ||
fun testDefaultToStringMethod() { | ||
val myPanacheEntityWithId = MyPanacheEntity(2912L) | ||
Assertions.assertEquals("MyPanacheEntity<2912>", myPanacheEntityWithId.toString()) | ||
val myPanacheEntityWithNullId = MyPanacheEntity(null) | ||
Assertions.assertEquals("MyPanacheEntity<null>", myPanacheEntityWithNullId.toString()) | ||
} | ||
|
||
internal class MyPanacheEntity(id: Long?) : PanacheEntity() { | ||
init { | ||
this.id = id | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
.../test/kotlin/io/quarkus/hibernate/orm/panache/kotlin/deployment/test/DuplicateIdEntity.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,9 @@ | ||
package io.quarkus.hibernate.orm.panache.kotlin.deployment.test | ||
|
||
import io.quarkus.hibernate.orm.panache.kotlin.PanacheEntity | ||
import javax.persistence.Id | ||
|
||
class DuplicateIdEntity : PanacheEntity() { | ||
@Id | ||
var customId: String? = null | ||
} |
Oops, something went wrong.