| Hibernate Team | 
				 
							
					  | 
				 
							 
				
					 Joined: Sun Sep 14, 2003 3:54 am Posts: 7256 Location: Paris, France				
			 | 
			
				
				
					| 
					
						 There is not common method unfortunatly.
 This kind of root exception is DB vendor specific. So you'll need to do :
  - try to read the entry before inserting it if you expect a high rate of failure
  - check the exception cause hierarchy to find your DB specific exception and rethrow your business exception.
 
 I know this could be a cool feature to abstract from the DB, but it probably has to come from the JDBC spec :( 
											 _________________ Emmanuel
					
  
						
					 | 
				 
				 
			 |