[
http://jira.jboss.com/jira/browse/JBSEAM-1596?page=comments#action_12368559 ]
Christian Bauer commented on JBSEAM-1596:
-----------------------------------------
"Currently, if a column is unique, we get a exception, which doesn't make it
possible to tell a user which field is not unique:
It would be nice if we get an InvalidStateException, which can be cleanly reported.
"
Uhm, you are supposed to _CHECK_ before you _INSERT_. You are not supposed to throw random
data in the direction of your database and then "report" if something fails.
This is what this issue is about, whether Seam should over built-in procedures for this
check or not. I agree with Emmanuel that it shouldn't, because avoiding race
conditions would require locking between check and insert, and that should really be up to
the developer.
Unique Constraint Validator
---------------------------
Key: JBSEAM-1596
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1596
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF
Affects Versions: 2.0.0.BETA1
Reporter: Pete Muir
Assigned To: Pete Muir
Priority: Minor
We could have a generic unique constrain validator as part of the model validation.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059691#...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira