I was looking through the Jakarta Validator stuff and looks really useful.
But from my reading, a missing component of the framework is a way to validate input against database entries (e.g., to check for primary key/foreign key integrity).
Has anyone done anything to sort of extend the framework -- or at least the syntax of the Validator file -- to handle that kind of lookup validation?
Thanks
Scott
-
Jakarta Validator and database lookup validation (2 messages)
- Posted by: scott powell
- Posted on: October 02 2004 13:15 EDT
Threaded Messages (2)
- whats the point by bruce goldstein on October 03 2004 21:23 EDT
- It's the environment we're working in... by scott powell on October 04 2004 01:47 EDT
-
whats the point[ Go to top ]
- Posted by: bruce goldstein
- Posted on: October 03 2004 21:23 EDT
- in response to scott powell
Whats the point of validating what the db already validates ? I do checking like this but it is expressed at the object level, i.e. i check that domain objects are non-null. For example if Product object has a Company property then I check that Company is non-null.
Note that this checking is not related to the database. All checking is done at the java object level. Which is how you should validate your objects, i.e. stick to the medium you are in.
Bruce -
It's the environment we're working in...[ Go to top ]
- Posted by: scott powell
- Posted on: October 04 2004 01:47 EDT
- in response to bruce goldstein
Bruce,
Thanks for your note.
It would be great if I could rely on the database to enforce relational integrity.
But I can't. I have a small role in maintaining a large app that my team inherited but whose initial developers never put any relational constraints on the system.
That said, validation rules for many objects are client specific and so it's not always possible to put all the constraints into the database. In our set up, the model tier is much easier to customize.
If anyone is aware of anything already out there, please let me know.
Thanks
Scott