Subject Re: [Firebird-Java] Hibernate and database constraints
Author Roman Rokytskyy
> I can catch the SQLErrorCode - but it binds me to firebird - it would
> be nicer if there is a generic way to handle such behaviour using
> build in hibernate exceptions.
>
> The SQLErrorCode is 335544665 but the SQLState is mostly HY000. It
> seems, that hibernate uses the first two characters of the sqlstate
> to determine the error cathegory (defined in SQLStateConverter.java)
> - and thus throws a more specific exception than the
> GenericJDBCException exception.

Yes. This is current limitation of the driver, that will be targeted in
the next minor release.

Roman