ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiran vuppla <kirankumar_vup...@yahoo.com>
Subject Re: Sql Map
Date Tue, 18 May 2010 14:50:44 GMT
Thanks for the reply.  Below is more info:

x.properties
 CONSTRAINT=col1='20'

y-sql-map.xml
<select name="test" >
  select col1, col2, col3 from tbl1 where col2 = 100 
<isNotNull prepend="AND" property="${CONSTRAINT}"> ${CONSTRAINT}</isNotNull>//
HERE CONSTRAINT is read from property file (x.properties) and do not want to pass as // parameter
from code
</select>

Thanks,
Kiran



________________________________
From: Clinton Begin <clinton.begin@gmail.com>
To: user-java@ibatis.apache.org
Sent: Tue, May 18, 2010 9:53:25 AM
Subject: Re: Sql Map

You can read it in from the file and try to pass it in just like any other parameter.  It's
hard to fully understand what you're trying to do here.

Clinton


On Tue, May 18, 2010 at 7:12 AM, kiran vuppla <kirankumar_vuppla@yahoo.com> wrote:

>
>I do not want to have it at build stage as it is customer specific and we will provide
the war file to the customer and the client must be able to add it and we need to pick it
during runtime or server startup. Is there any other way?
>
>
>Thanks,
>Kiran
>
>
>
________________________________
 >From: Clinton Begin <clinton.begin@gmail.com>
>To: user-java@ibatis.apache.org
>Sent: Mon, May 17, 2010 6:17:39 PM
>Subject: Re: Sql Map
>
>
>If it's in a property file, can you just do this at the build stage?  It will be faster
to do so too.
>
>Clinton
>
>
>On Mon, May 17, 2010 at 2:42 PM, kiran vuppla <kirankumar_vuppla@yahoo.com> wrote:
>
>>>
>>Hi,
>>
>>
>>  I would like if we can do the following check in the Query inside <select>
statement. I am reading the property from property file instead of parameter map. Though I
have the property(CONSTRAINT) in the property file, this is not getting added to the existing
SQL statement. Can someone help me.
>>
>>
>><isNotNull prepend="AND"  property="${CONSTRAINT}">
>> ${CONSTRAINT}
>></isNotNull>
>>
>>
>>Thanks,
>>Kiran
>>
>
>



      
Mime
View raw message