If we misspelled the column name in the annotation, then hibernate will create that column automatically. I don’t know whether we can turn this feature off.
Steps to Reproduce
- Setup the environment as said here.
- Now go back to patient.java and change @Column(name="firstname") to @Column(name="firtname")
- Now run the test java file.
- You can see, it will run successfully without any error.
- And now go back to db. and if you check the patient table, now you can see one more column added and null inserted for all the records