mardi 7 avril 2015

Hibernate 3.6 vs Hibernate 4 Validations and Compatibility issues


Test 1:



Hibernate 3.6.0 Hibernate Validator 4.1.0


Everything works as expected and Annotations on Entity properties works as expected



@Column(name = "test_id", updatable = false, nullable = false)


When it's false, it throws Exception and Custom ID generator works as expected.



@GenericGenerator(
name = "myGenerator",
strategy = "com.test.MyIdGenerator",
parameters = {}
)



Test 2:



Hibernate 4.3.8 Hibernate Validator 5.1.3


Validation doesn't throw Exception if it's null and Custom ID generator doesn't work. Literally, none of the annotations are working?


How do I keep compatibility with older annotations or migration help?


Aucun commentaire:

Enregistrer un commentaire