You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ralf Assmann <ra...@innovations.de> on 2007/11/15 14:55:03 UTC

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



Re: Using # in a schema name?

Posted by Nathan Maves <na...@gmail.com>.
good question.... a better one might be how do you find the person that
named the schema name that way and terminate their employment :)

just a guess but try to use a double hash ##

Nathan

On Nov 15, 2007 6:55 AM, Ralf Assmann <ra...@innovations.de> wrote:

>
> 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
>
>
>