How to disable schema validation in Hibernate for certain entities?

前端 未结 2 1521
北海茫月
北海茫月 2021-01-05 07:33

How do I disable schema validation in Hibernate for certain entities (not all)? Some of my entities are using SQL which lead to fail validation so I want to disable validati

2条回答
  •  离开以前
    2021-01-05 08:19

    not sure which version of hibernate you are using, but it can be done using: hibernate.hbm2ddl.schema_filter_provider property

    Hibernate Configuration

    Used to specify the org.hibernate.tool.schema.spi.SchemaFilterProvider to be used by create, drop, migrate, and validate operations on the database schema. SchemaFilterProvider provides filters that can be used to limit the scope of these operations to specific namespaces, tables and sequences. All objects are included by defau

提交回复
热议问题