-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Annotations, Validation and the hbm.xml mapping file
PostPosted: Fri Oct 05, 2007 11:37 am 
Newbie

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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.