File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes hibernate validator question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "hibernate validator question" Watch "hibernate validator question" New topic
Author

hibernate validator question

jim li
Ranch Hand

Joined: May 20, 2008
Posts: 177
<hibernate-configuration>
...
<event type="pre-update">
<listener
class="org.hibernate.validator.event.ValidateEventListener"/>
</event>
<event type="pre-insert">
<listener
class="org.hibernate.validator.event.ValidateEventListener"/>
</event>
</hibernate-configuration>

@entity
public class ta{
@Column( unique=true )
private String code;

}

i want hibernate validator to show me the errors when i try to insert a duplicated value. but there is only one exception which is not what i wanted

can anyone tell me what is wrong with the configuration file?
jim li
Ranch Hand

Joined: May 20, 2008
Posts: 177
fixed the problem
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: hibernate validator question
 
Similar Threads
Hibernate and MySQL connection issues
Envers configuration with hibernate.cfg.xml
Getting only required value when we use event.geetOldState()
Records not getting updated when PreUpdate listener is used in Hibernate
Hibernate Search In Action- Hibernate Search Event listeners ?