I just started upgrading an application that used Hibernate 3.5.6.Final to 3.6.0.Final, and there has been several hickups. The last hickup I can't find a solution for.
3.6.0.Final seems to automatically turn on bean validation when an object is saved/updated through Hibernate. This is very bad because some of my tests don't bother setting all the properties - they just aren't needed. I honestly don't see the point to set every 'description' field and countless other fields just to comply with some arbitrary validation.
This is going to force me to spend hours making valid objects in all of my tests (I have over 1300 functional tests now). And frankly, it would be pointless because I am certain that all validation is happening in the MVC and there are no other ways to get data into the database currently.
I also don't want to incur a performance hit by validating my beans twice - once in the MVC, and then another time within Hibernate. It's just not needed in my case.
Is there a way I can turn this off? I am using Spring and regular Hibernate mapping files, not JPA (I dislike all the annotations).
|