5

I am using <property name="hibernate.hbm2ddl.auto" value="validate" /> to validate the java project against the database. But I want to skip the validation for specidc entity column, since they have wrong mapping but I don't want to change those in the java project or database.( working fine without validation , but I want to turn on the validation in the project)

is there any annotation to skip the mapping validation for specific entity fileds?

Yashar
  • 1,122
  • 2
  • 15
  • 43
  • why is the mapping wrong? – Maurice Perry Jan 29 '18 at 13:49
  • 1
    since database not created by the application or java . String in the database maped with int in java , but if we turn off the validation it is working fine. so I want tu keep validation on but skipp validatin for these columns – Yashar Jan 29 '18 at 13:52
  • validation exist for checking exactly consistency between java and db. if you don't need it and don't care about possible problem why not just avoid it? also afaik there is no way to instruct a partial validation – Zeromus Jan 29 '18 at 13:54
  • 3
    @Zeromus I do care about the problems and have fixed most of them , but some of them can't be fixed without manipulating the data in production that we want to avoid – Yashar Jan 29 '18 at 15:05

0 Answers0