mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
#2404 - Initializing @OneToMany with mutableListOf() in Kotlin results in ClassCastException
This commit is contained in:
1 parent
2cee03bc4b
commit
40492f487c
4 files changed
+57
-9
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package io.ebean.test.kotlin
|
||||
|
||||
import io.ebean.common.BeanList
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.example.order.Customer
|
||||
import org.example.order.Order
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class OneToManyEnhancementTest {
|
||||
|
||||
@Test
|
||||
fun `o2m is BeanCollection`() {
|
||||
val customer = Customer("foo")
|
||||
val order = Order(customer)
|
||||
|
||||
assertThat(order.items).isInstanceOf(BeanList::class.java)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user