Question

Recently i upgraded to hibernate 4 and found that there are some constraints loading each time server is started. I wanted to know how this table constraints are added through hibernate. Which hibernate class loads the table properties such as table name, columns, indexes, constraints etc.

Is this loading different from previous hibernate versions.

Was it helpful?

Solution

This is done in classes org.hibernate.cfg.Configuration, and org.hibernate.cfg.AnnotationBinder, search for constraint keyword there and put some breakpoints.

You can also turn on the logging and search for the constraint names or keyword constraint, try with DEBUG level first and TRACE if it doesn't help:

<logger name="org.hibernate">
    <level value="debug" />
</logger >   
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top