Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.persistence.PersistenceException: Database [null] was not found? when accessing OneToMany property #2861

Closed
Incanus3 opened this issue Oct 19, 2022 · 8 comments
Assignees
Labels
Milestone

Comments

@Incanus3
Copy link
Contributor

Incanus3 commented Oct 19, 2022

Expected behavior

  • load and return the associated records

Actual behavior

  • fails with "javax.persistence.PersistenceException: Database [null] was not found?"

Steps to reproduce

// the entities (most attributes omitted)
@Entity
@DbName("ea")
@Table(name = "T_OBJECT")
data class EaObject(
    @Id
    @Column(name = "OBJECT_ID", nullable = false)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "t_object_sequence_generator")
    @SequenceGenerator(
        name = "t_object_sequence_generator",
        sequenceName = "OBJECT_ID_SEQ",
        allocationSize = 1,
    )
    var id: Long = 0,

    @Column(name = "NAME")
    var name: String? = null,
) : Serializable {
    @JsonIgnore
    @OneToMany(mappedBy = "startObject", fetch = FetchType.LAZY, cascade = [CascadeType.ALL])
    var outgoingConnections: List<EaConnector> = emptyList()

    @JsonIgnore
    @OneToMany(mappedBy = "endObject", fetch = FetchType.LAZY, cascade = [CascadeType.ALL])
    var incomingConnections: List<EaConnector> = emptyList()

    override fun equals(other: Any?): Boolean = other is EaObject && other.id == this.id
    override fun hashCode(): Int = id.hashCode()
}

@Entity
@DbName("ea")
@Table(name = "T_CONNECTOR")
data class EaConnector(
    @Id
    @Column(name = "CONNECTOR_ID", nullable = false)
    @GeneratedValue(
        strategy = GenerationType.SEQUENCE,
        generator = "t_connector_sequence_generator",
    )
    @SequenceGenerator(
        name = "t_connector_sequence_generator",
        sequenceName = "CONNECTOR_ID_SEQ",
        allocationSize = 1,
    )
    var id: Long = 0,

    // these are used only by the Db implementation
    @Column(name = "START_OBJECT_ID", nullable = false)
    var startObjectId: Long,

    @Column(name = "END_OBJECT_ID", nullable = false)
    var endObjectId: Long,
) : Serializable {
    @JsonIgnore
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "START_OBJECT_ID", nullable = false, insertable = false, updatable = false)
    var startObject: EaObject? = null

    @JsonIgnore
    @ManyToOne(optional = false, fetch = FetchType.LAZY)
    @JoinColumn(name = "END_OBJECT_ID", nullable = false, insertable = false, updatable = false)
    var endObject: EaObject? = null

    override fun equals(other: Any?): Boolean = other is EaConnector && other.id == this.id
    override fun hashCode(): Int = id.hashCode()
}

// the persistence configuration
@TestConfiguration
@Import(JacksonAutoConfiguration::class)
class TestEaPersistenceConfiguration {
    @Autowired
    lateinit var objectMapper: ObjectMapper

    // in test this is bound to
    // datasource:
    //   ea:
    //     username: sa
    //     password: sa
    //     url: jdbc:h2:mem:eadb
    //     driver: org.h2.Driver
    @Bean
    @ConfigurationProperties(prefix = "datasource.ea")
    fun testEaDataSourceConfig() = DataSourceConfig()

    @Bean
    fun testEaDatabaseConfig() = EaDatabaseConfig(
        dataSourceConfig = testEaDataSourceConfig(),
        objectMapper = objectMapper,
        createSchema = true,
    )

    @Bean
    fun eaDatabase(): Database = DatabaseFactory.create(testEaDatabaseConfig())
}

// the test
@SpringBootTest(
    classes = [
        DummyTestApplication::class,
        TestEaPersistenceConfiguration::class,
    ],
)
class ObjectConnectorRelationsTest {
    @Autowired
    lateinit var database: Database

    @Test
    fun createUsingDatabase() {
        val object1 = EaObject(name = "object1")
        val object2 = EaObject(name = "object2")

        database.saveAll(object1, object2)

        val connection = EaConnector(startObjectId = object1.id, endObjectId = object2.id)

        database.save(connection)

        // relations aren't populated on save
        connection.startObject shouldBe null
        connection.endObject shouldBe null
        object1.outgoingConnections shouldBe emptyList()

        // this has the same problem
        // val reloadedObject1 = database.createQuery(EaObject::class.java).where().idEq(object1.id).findOne()!!
        val reloadedObject1 = database.find(EaObject::class.java, object1.id)!!
        val reloadedConnection = database.find(EaConnector::class.java, connection.id)!!

        // relations are populated on reload
        reloadedConnection.startObject shouldBe object1 // THESE WORK
        reloadedConnection.endObject shouldBe object2

        println(reloadedObject1.outgoingConnections) // THIS FAILS
    }
}
Database [null] was not found?
javax.persistence.PersistenceException: Database [null] was not found?
	at io.ebean.bean.EntityBeanIntercept.loadBean(EntityBeanIntercept.java:838)
	at io.ebean.bean.EntityBeanIntercept.preGetter(EntityBeanIntercept.java:946)
	at cz.sentica.qwazar.ea.core.entities.EaObject._ebean_get_outgoingConnections(EaObject.kt:1)
	at cz.sentica.qwazar.ea.core.entities.EaObject.getOutgoingConnections(EaObject.kt:128)
	at cz.sentica.qwazar.ea.db.repositories.ObjectConnectorRelationsTest.createUsingDatabase(ObjectConnectorRelationsTest.kt:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:210)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at java.util.ArrayList.forEach(ArrayList.java:1259)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at com.sun.proxy.$Proxy2.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

The environment

we're using

  • java 8 (sadly - still waiting for the client to approve upgrade, this is also why we can't upgrade to ebean 13)
  • kotlin 1.6.21
  • ebean 12.16.1 (maybe this issue is already resolve in newer version, but I didn't find any existing issue adressing this)

Also

  • I have done some tracing and can provide more details about where and why this is happening - will write this down in a separate comment in a few minutes
  • if you want, I can try to isolate this as much as possible from the project and then try to upgrade ebean and try there
@Incanus3
Copy link
Contributor Author

Incanus3 commented Oct 19, 2022

@Incanus3
Copy link
Contributor Author

Incanus3 commented Oct 19, 2022

update: I've updated to java 17 and ebean 13.5.0 and the problem persists, tried to upgrade to 13.6.0, but I'm having some problem with initialization of one of the entity bean classes, specifically

Caused by: java.lang.IllegalStateException: Error trying to create the prototypeEntityBean for class cz.sentica.qwazar.ea.core.entities.EaObjectProperty
	at io.ebeaninternal.server.deploy.BeanDescriptor.createPrototypeEntityBean(BeanDescriptor.java:431)
	at io.ebeaninternal.server.deploy.BeanDescriptor.<init>(BeanDescriptor.java:246)
	at io.ebeaninternal.server.deploy.BeanDescriptorManager.registerDescriptor(BeanDescriptorManager.java:620)
	at io.ebeaninternal.server.deploy.BeanDescriptorManager.readEntityRelationships(BeanDescriptorManager.java:735)
	at io.ebeaninternal.server.deploy.BeanDescriptorManager.deploy(BeanDescriptorManager.java:295)
	at io.ebeaninternal.server.core.InternalConfiguration.<init>(InternalConfiguration.java:128)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:109)
	at io.ebeaninternal.server.core.DefaultContainer.createServer(DefaultContainer.java:34)
	at io.ebean.DatabaseFactory.createInternal(DatabaseFactory.java:136)
	at io.ebean.DatabaseFactory.create(DatabaseFactory.java:85)
	at cz.sentica.qwazar.ea.test.TestEaPersistenceConfiguration.eaDatabase(TestEaPersistenceConfiguration.kt:33)
	at cz.sentica.qwazar.ea.test.TestEaPersistenceConfiguration$$EnhancerBySpringCGLIB$$108ad610.CGLIB$eaDatabase$4(<generated>)
	at cz.sentica.qwazar.ea.test.TestEaPersistenceConfiguration$$EnhancerBySpringCGLIB$$108ad610$$FastClassBySpringCGLIB$$1144e9fb.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at cz.sentica.qwazar.ea.test.TestEaPersistenceConfiguration$$EnhancerBySpringCGLIB$$108ad610.eaDatabase(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 107 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at io.ebeaninternal.server.deploy.BeanDescriptor.createPrototypeEntityBean(BeanDescriptor.java:429)
	... 127 more
Caused by: java.lang.InstantiationError: io.ebean.bean.EntityBeanIntercept
	at cz.sentica.qwazar.ea.core.entities.EaObjectProperty.<init>(EaConnector.kt:1)
	... 133 more

for a bean class defined as

@Entity
@DbName("ea")
@Table(name = "T_OBJECTPROPERTIES")
data class EaObjectProperty(
    @Id
    @Column(name = "PROPERTYID", nullable = false)
    @GeneratedValue(
        strategy = GenerationType.SEQUENCE,
        generator = "t_objectproperty_sequence_generator",
    )
    @SequenceGenerator(
        name = "t_objectproperty_sequence_generator",
        sequenceName = "PROPERTYID_SEQ",
        allocationSize = 1,
    )
    var id: Long = 0,

    @Column(name = "PROPERTY")
    var property: String? = null,

    @Column(name = "Value") // Case je spravne - alespon pro firebird databazi.
    var value: String? = null,

    @Column(name = "NOTES")
    @Lob
    var notes: String? = null,

    @Column(name = "EA_GUID")
    var eaGuid: String? = null,

    @ManyToOne
    @JoinColumn(name = "OBJECT_ID", nullable = false)
    @JsonIgnore
    var eaObject: EaObject,
) : Serializable {
    companion object {
        const val VALUE_MAXLEN = 255
    }
}

will investigate further

update: this doesn't seem to be related to that specific entity - getting the same for other entity classes

@Incanus3
Copy link
Contributor Author

Incanus3 commented Oct 19, 2022

I created a minimal repository to reproduce this problem here https:/Incanus3/ebean-test it has only those two entities and the test from above. In this repository I was able to upgrade ebean to the latest version without encountering the "java.lang.InstantiationError: io.ebean.bean.EntityBeanIntercept" problem, so I guess it's some problem with our setup. But the "Database [null] not found" problem is still there.

@Incanus3
Copy link
Contributor Author

btw what's even more surprising to me is that this fails even if I set all the fetch types to FetchType.EAGER

@Incanus3
Copy link
Contributor Author

Incanus3 commented Oct 20, 2022

Damn, I just found the problem - this happens if I use the List type instead of MutableList for the OneToMany attribute. sorry to bother you guys. But if it were possible to handle this case - either make it work or at least throw a nicer error, it would be really nice. Since I'm setting insertable and updatable to null, I'm not really going to mutate the list, it should be read-only.

Anyway, I'm sorry for taking up your time and thank you for this great library, I really enjoy using it (until I make a stupid mistake :).

@rbygrave
Copy link
Member

Excellent work, well done.

this happens if I use the List type instead of MutableList

I've had a closer look at this and its actually the initialization of the list to emptyList() [vs arrayListOf()] that is causing this problem here. The emptyList() here in bytecode is:

kotlin.collections.CollectionsKt.emptyList()

... and it's this initialisation that Ebean is not expecting and handling correctly.

emptyList() - Does not work

The use of emptyList() causes the problem here

@OneToMany(...)
var outgoingConnections: List<EaConnector> = emptyList()  // this will NOT work

arrayListOf() - Works

Initialising using arrayListOf() works [but maybe it doesn't make sense right].

@OneToMany(...)
var outgoingConnections: List<EaConnector> = arrayListOf() // this will work

... and of course

And MutableList and arrayListOf() work of course.

@OneToMany(...)
var incomingConnections: MutableList<EaConnector> = arrayListOf()

were possible to handle this case - either make it work or at least throw a nicer error

I'm pretty sure we can handle this case.

mistake

I feel your pain but I know I would have looked at List and emptyList() 100 times before releasing it was different types being Kotlin - this was pretty subtle and yes a weird and unhelpful error.

The big positive is that this is a really nice issue to find because I'd suggest other people will very likely hit this plus this is a really nice little test app showing us the problem so we have every chance of sorting this!!

Cheers, Rob.

what's even more surprising to me is that this fails even if I set all the fetch types to FetchType.EAGER

Yeah, I need to explain a bit more on what is going on, why ebean is handling the "initialisation of OneToMany and ManyToMany". Some internal details to explain at some point which are actually harder to see in Kotlin in that IntelliJ doesn't easily offer up the bytecode view - need to use ASM plugin etc.

@Incanus3
Copy link
Contributor Author

Hi. Ooh, EmptyList is actually a type of its own, and it implements List<Nothing>, that makes sense :D. Nice thing that I can use immutable List, just initialize it differently though. I'm glad if this issue is at least helpful to others and the repo to you. If you decide to handle this case, it would be great as it could help other people avoid getting stuck on it. And thanks again, you're really doing excellent work.

@rbygrave rbygrave self-assigned this Nov 2, 2022
@rbygrave rbygrave added the bug label Nov 2, 2022
@rbygrave rbygrave added this to the 13.10.1 milestone Nov 2, 2022
@rbygrave
Copy link
Member

rbygrave commented Nov 2, 2022

Fixed by ebean-orm/ebean-agent#191

Upgrading the ebean gradle plugin to 13.10.1 (which has just been released) fixes the issue.

@rbygrave rbygrave closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants