Skip to content

Add a supported configuration property "hibernate.hbm2ddl.extra_physical_table_types" #47854

@GeraldScott

Description

@GeraldScott

Description

Hibernate fails to validate Schema if the table is a FOREIGN TABLE or MATERIALIZED VIEW (see for example this Stackoverflow thread).

The fix is to set hibernate.hbm2ddl.extra_physical_table_types = FOREIGN TABLE but this is not a supported Hibernate configuration property so it must be add as an unsupported property:

quarkus.hibernate-orm.unsupported-properties."hibernate.hbm2ddl.extra_physical_table_types"=FOREIGN TABLE

This works as expected but generates

WARN [io.qua.hib.orm.run.FastBootHibernatePersistenceProvider] (JPA Startup Thread) Persistence-unit [] sets unsupported properties. These properties may not work correctly, and even if they do, that may change when upgrading to a newer version of Quarkus (even just a micro/patch version). Consider using a supported configuration property before falling back to unsupported ones. If there is no supported equivalent, make sure to file a feature request so that a supported configuration property can be added to Quarkus, and more importantly so that the configuration property is tested regularly. Unsupported properties being set: [hibernate.hbm2ddl.extra_physical_table_types]

Adding extra_physical_table_types to the list of supported properties will prevent this warning and makes it easier to use foreign tables in PanacheEntities.

Implementation ideas

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions