jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Support for H2 database

Open knstvk opened this issue 1 year ago • 2 comments

See motivation here: https://forum.jmix.io/t/h2-database-support/4548

knstvk avatar Mar 06 '24 08:03 knstvk

Studio issue: https://youtrack.jmix.io/issue/JST-6250/Support-for-H2-database

knstvk avatar Nov 24 '25 13:11 knstvk

All application project templates now use H2 by default. You can set spring.h2.console.enabled=true and access H2 console at localhost:8080/h2-console. To connect to the database, enter the same DB URL as in application.properties.

knstvk avatar Dec 02 '25 04:12 knstvk

1.Error occurs when user try to create new Entity instance in case ID value type was set as 'Identity column'

    @Column(name = "ID", nullable = false)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    var id: Long? = null

https://github.com/h2database/h2database/issues/3333

Image Image

mig-sam avatar Dec 22 '25 13:12 mig-sam

Issue with identity column is fixed by switching each new connection to LEGACY mode in EclipseLink, until https://github.com/eclipse-ee4j/eclipselink/issues/1393 is fixed

knstvk avatar Jan 27 '26 06:01 knstvk

Tested on: Jmix version: 2.8.999-SNAPSHOT Jmix Studio Plugin Version: 2.8.SNAPSHOT8101-252 IntelliJ version: IntelliJ IDEA 2025.2 (Community Edition)

mig-sam avatar Feb 02 '26 13:02 mig-sam