I have to add a value to the column in the database for one particular project. I want to add the value to the column only if the column exists in the schema else not.
Is there any particular annotation which would work for this scenario. I will apply the annotation to the POJO class which is having value mapped to database using @Column.
No brother! As you said your POJO class is "mapped", Hibernate will create the table according to the mapped POJO, thats all.
If you have a property in POJO, it will create otherwise doesn't.
So here your statement "if" is wrong.