ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Butler <jeffgbut...@gmail.com>
Subject Re: Please HELP - IBatis not throwing Unique constraint exception
Date Wed, 17 Jun 2009 18:21:46 GMT
In that case all the DAO methods will throw SQLException if it is thrown by
the driver.  iBATIS/Ibator is doing nothing to "swallow" these exceptions -
you're driver is either not throwing them, or you are handling them at some
other layer of your application.

Jeff Butler


On Wed, Jun 17, 2009 at 12:31 PM, Ivan Bojer <ibojer@gmail.com> wrote:

> My generator type is GENERIC-CI. I thought that IBATOR DAOGenerator
> type is deprecated.
>
> Please advise!
>
> Thank you.
>
> On Wed, Jun 17, 2009 at 10:05 AM, Larry Meadors<larry.meadors@gmail.com>
> wrote:
> > Are you using ibatis dao?
> >
> > It rethrows them as a DaoException which is a RuntimeException, IIRC.
> >
> > Larry
> >
> >
> > On Wed, Jun 17, 2009 at 10:59 AM, Ivan Bojer<ibojer@gmail.com> wrote:
> >> Hi,
> >>
> >> I have a problem where IBatis never throws any of the constaint
> >> exceptions. My set-up is:
> >> - postgresql 8.3.5
> >> - postgres JDBC type 3 driver
> >> - ibator for DAO and POJO generation
> >>
> >> I have a simple table which has an unique constraint on the column. e.g.
> >>
> >> CREATE TABLE SCHEMA_CONF.dns_suffix (
> >>    suffix VARCHAR(128) NOT NULL UNIQUE,
> >> );
> >>
> >> The problem is that I can try to insert 'n' numbers of entries into it
> >> and they will be rejected by database (as expected), but
> >> I never get any SQLExceptions thrown back. Database logs clearly show
> >> that commit was rejected because of UNIQUE constraint
> >> violation.
> >>
> >> What am I missing? Any hints?
> >>
> >
>

Mime
View raw message