Joined: Fri Oct 05, 2007 11:08 am Posts: 1
|
Is there any particular reason that Validator Tags have not been included the hbm.xml mapping file format for Hibernate 3? (Note: And also accounted for in the tools that convert POJOs to Mapping Files and Mapping Files to POJOs?)
For my current project, it is essential that all data validation rules are applied in the database as well as in the POJOs. To do this POJO Validator annotations need to transferable from POJO to mapping file and visa versa.
The reasonning behind this is:
- There are non Hibernate applications accessing the data.
- The Validation rules are the same for all applications.
- DBAs must be able to change the validation rules at the behest of the business.
- The same rules must be applied everywhere.
Commons Validator allows the same rules to be applied in all Java based application code.
But when it comes to a mapping file that matches objects to the relational database it is missing.
The way things are at the moment I will have to write bespoke build code to do this.
- Code to modify the POJOs in light of mapping file changes.
- Code to modify the mapping file in light of POJO changes.
Surely this should be a core part of Hibernate?
Or am I missing something?
|
|