I like it!

Jeff Butler

On Thu, Aug 13, 2009 at 10:02 AM, Clinton Begin<clinton.be...@gmail.com> wrote:
> Sorry for being unclear.  Jeff's explanation is correct.
>
> The reason I didn't put the property syntax in is that we need a way to
> specify whether the property should be parameterized, or just injected... so
> what I was thinking was maybe something like:
>
> #{env:prop_name} or something like that.  That way it could be a JDBC
> parameter, or a string like ${env:prop_name}
>
> Thoughts?
> Clinton
>
> On Thu, Aug 13, 2009 at 7:53 AM, Jeff Butler <jeffgbut...@gmail.com> wrote:
>>
>> You can't do this with a properties file.  You'll have to make
>> $schema$ a property of your parameter object.
>>
>> At one point we talked about adding syntax for accessing properties in
>> SQL statements for iBATIS3, but it did not get implemented.  Then we
>> would have had something like this:
>>
>> #{...} use bean properties as parameters
>> ${...} use bean properties for string substitution
>> ?{...} use system properties for string substitution
>>
>> I don't remember if we thought this was too complex to implement, or
>> too confusing to use, or if we just forgot to do it.
>>
>> Jeff Butler
>>
>>
>> On Thu, Aug 13, 2009 at 9:31 AM, pczurak<czu...@wsinc.com> wrote:
>> >
>> > I tried $schema$, but getting the following error.
>> >
>> > Cause: com.ibatis.common.beans.ProbeException: There is no READABLE
>> > property
>> > named 'schema' in class 'com.wsinc.control.model.proddta.Control';
>> > nested
>> > exception is com.ibatis.common.jdbc.exception.NestedSQLException:
>> >
>> > So it seems $schema$ should work, but I don't know where to define it,
>> > what
>> > file or what section.
>> > Would it go in the applicationContext.xml file, but what section?
>> >
>> >
>> >
>> > Clinton Begin wrote:
>> >>
>> >> Sorry... iBATIS 2...
>> >>
>> >>
>> >> $schema$
>> >>
>> >> On Wed, Aug 12, 2009 at 10:57 PM, pczurak <czu...@wsinc.com> wrote:
>> >>
>> >>>
>> >>> I did, but I get Syntax errors in my SQL statements, so iBATES does
>> >>> not
>> >>> understand ${schema}
>> >>>
>> >>> I don't know how or where to tell iBates to look in the properties
>> >>> file
>> >>>
>> >>>
>> >>> Clinton Begin wrote:
>> >>> >
>> >>> > Try the properties file you're using to configure the app...
>> >>> > (specified
>> >>> in
>> >>> > the <properties...> element)
>> >>> >
>> >>> > On Wed, Aug 12, 2009 at 10:48 PM, pczurak <czu...@wsinc.com> wrote:
>> >>> >
>> >>> >>
>> >>> >> I've seen this post
>> >>> >>
>> >>> >> http://www.mail-archive.com/user-java@ibatis.apache.org/msg09212.html
>> >>> >>
>> >>> >> http://www.mail-archive.com/user-java@ibatis.apache.org/msg09212.html
>> >>> >>
>> >>> >>
>> >>> >> But it does not explain what file or where, so I though maybe
>> >>> >> someone
>> >>> in
>> >>> >> this forum would know.
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> Clinton Begin wrote:
>> >>> >> >
>> >>> >> > I suggest you remove the specific schema and log in as the
>> >>> appropriate
>> >>> >> > user
>> >>> >> > and use the appropriate schema.  This can be specified in your
>> >>> >> > JDBC
>> >>> >> URL.
>> >>> >> >
>> >>> >> > But if they're hard coded as you have below... then you're in for
>> >>> some
>> >>> >> > Search and Replace.
>> >>> >> >
>> >>> >> > clinton
>> >>> >> >
>> >>> >> > On Wed, Aug 12, 2009 at 10:26 PM, pczurak <czu...@wsinc.com>
>> >>> >> > wrote:
>> >>> >> >
>> >>> >> >>
>> >>> >> >> I am using iBATIS 2.1
>> >>> >> >>
>> >>> >> >> My question is how do I change Schema name for DB2 database?
>> >>> >> >>
>> >>> >> >> Schema.tablename
>> >>> >> >>
>> >>> >> >> ex: Select * from TEST.Payroll Payroll where amount > 100
>> >>> >> >> change to
>> >>> >> >> Select * from PRODUCTION.Payroll Payroll where amount > 100
>> >>> >> >>
>> >>> >> >> What file and what parameters/properties do I have to change /
>> >>> >> >> add
>> >>> so
>> >>> >> I
>> >>> >> >> can
>> >>> >> >> change the schema without changing all of the XML files ?
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> Thank You
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> Peter
>> >>> >> >> --
>> >>> >> >> View this message in context:
>> >>> >> >>
>> >>> http://www.nabble.com/How-Do-I-Change-Schema-tp24948645p24948645.html
>> >>> >> >> Sent from the iBATIS - User - Java mailing list archive at
>> >>> Nabble.com.
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> ---------------------------------------------------------------------
>> >>> >> >> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> >>> >> >> For additional commands, e-mail:
>> >>> >> >> user-java-h...@ibatis.apache.org
>> >>> >> >>
>> >>> >> >>
>> >>> >> >
>> >>> >> >
>> >>> >>
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>> >> http://www.nabble.com/How-Do-I-Change-Schema-tp24948645p24948782.html
>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>> >>> >> Nabble.com.
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> ---------------------------------------------------------------------
>> >>> >> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> >>> >> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>> >>> >>
>> >>> >>
>> >>> >
>> >>> >
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>> http://www.nabble.com/How-Do-I-Change-Schema-tp24948645p24948843.html
>> >>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> >>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>> >>>
>> >>>
>> >>
>> >>
>> >
>> > --
>> > View this message in context:
>> > http://www.nabble.com/How-Do-I-Change-Schema-tp24948645p24954424.html
>> > Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> > For additional commands, e-mail: user-java-h...@ibatis.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
>> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to