hi,
in a form I want to validate that the code asigned in a field is one that already exists.
For instance, IÃÂôve a field for currencies. I have a table for them, and I want to
check that the currency filled is already on the database to avoid foreign keys problems.
IÃÂôve found 2 solutions. The first is to override persist method and there by means
of a query to check if that value is ok.
The second is to add a try-catch in the persist, and in the catch check if there has been
an Exception like this
org.hibernate.TransientObjectException: object references an unsaved transient instance -
save the transient instance before flushing:...
Is there a better "seam-way" of validating this?
thanks in advance!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107970#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...