javaoracle-databasespring-data-jpahbm2ddl

Does spring.jpa.hibernate.ddl-auto = validate property validates the columns with table?


In my application i am using below property

 spring.jpa.properties.hibernate.hbm2ddl.auto= validate

so does it validates schema like if manually i added one new column in my oracle table and not added this column in java entity .

so in this case will it give error on project startup ?


Solution

  • No, it's perfectly alright to have columns in a table that aren't mapped. An error would be a missing column or table that's mapped to an entity. Your database doesn't need to be identical to your mappings.