ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: SQLMap validation at startup?
Date Tue, 05 Sep 2006 18:34:03 GMT
Because it can't.

How would it do it with something like this:

select orderId, qty, price, qty*price as extendedPrice from ...

It would have to (a) execute the SQL, or (b) parse the SQL.

But it gets better!

How would it do it with something like this:

select
  orderId,
  qty,
  price,
  <isNotNull property="showExtPrice">qty*price as extendedPrice</isNotNull>
from ...

Bottom line is that what you are asking for is not really possible
unless you can satisfy yourself with your integration tests.

Larry


On 9/5/06, Matthew Hixson <mhixson@activerain.com> wrote:
> We are using Spring.  What I mean is that if I have this in a SQLMap:
>
> <result property="decisionFlag" column="decisionFlag"/>
>
> it would be nice to have iBatis take a look at the database and tell
> me that there really is no column named decisionFlag in this business
> object (the real column name is decision_flag).  Right now it only
> tells me that the first time I access the object.
>    -M@
>
> On Sep 5, 2006, at 9:24 AM, Christopher.Mathrusse@sybase.com wrote:
>
> > If you use Spring all SQL Maps get loaded and validated at startup.
> >
> > From: Matthew Hixson <mhixson@activerain.com> [mailto:Matthew
> > Hixson <mhixson@activerain.com>]
> > Sent: Friday, September 01, 2006 5:22 PM
> > To: user-java@ibatis.apache.org
> > Subject: SQLMap validation at startup?
> >
> > Was wondering if there was any way to get iBatis to validate that all
> > of the SQLMaps are sane at startup time instead of whenever a
> > business object is used. What I want to do is prevent having to run
> > through the code/deploy/login to webapp/test/get exception process 3
> > times when I have 3 typos in my SQLMaps.
> >
> > Not that I'm bitter.
> >
> > -M@
> >
>
>

Mime
View raw message