the string substitute is done before the parameters are set.  so when the
final string value was parsed there was an extra # in it.  hence the need to
escape it.

On Nov 15, 2007 7:06 AM, Niels Beekman <[EMAIL PROTECTED]> wrote:

> That's weird, I would assume iBATIS to just inject the schemaname, not
> reprocess it. Try escaping the # with ##.
>
> Niels
>
> -----Original Message-----
> From: Ralf Assmann [mailto:[EMAIL PROTECTED]
> Sent: donderdag 15 november 2007 14:55
> To: [email protected]
> Subject: Using # in a schema name?
>
>
> Hi there,
>
> using iBATIS, we have to problem setting the schema name of a table.
>
> If the statement is defined as
>
> SELECT field1
> FROM ${schema}.TESTTABLE
> WHERE field2 = #field2#
>
> and the ${schema} set to "ab#123" in den configuration files (the schema
>
> name ist given as a username, no change is possible), iBATIS tries to
> execute a statement like
>
> SELECT field1
> FROM ab#123.TESTTABLE
> WHERE field2 = #field2#
>
> Now, the problem is, that # is a placeholder for attributes, iBATIS
> tries to find a getter for #123.TESTTABLE WHERE field2 = #.
>
> How is it possible to set a schema name including a # in its name?
>
> Many thanks.
>
>
> Ralf
>
>
>

Reply via email to