Ibatis sql interpreter and firebird rdb$ problem
------------------------------------------------
Key: IBATIS-117
URL: http://issues.apache.org/jira/browse/IBATIS-117
Project: iBatis for Java
Type: Bug
Components: SQL Maps
Versions: 2.0.9b
Environment: All Operative systems, last release ibatis version. The problem
is with firebird databases
Reporter: agharta
Priority: Blocker
Hi all!
I suppose that the problem is very serious:
I need to query the system tables of firebird database (rdb$ like tables).
example, get the next table id:
<statement id="getNextBookId"
resultClass="java.lang.Integer" >
<![CDATA[
SELECT GEN_ID(seq_book,1) from RDB$DATABASE
]]>
</statement>
This query should return the nezt id available for an associated table (in this
case, my BOOK table).
Problem: the character '$' is interpreted by ibatis like a parameter.
Result:
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in Book.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the Book.getNextBookId.
--- Check the SQL statement.
--- Cause: java.util.NoSuchElementException
Caused by: java.util.NoSuchElementException
Ibatis does not read correctly the query and query fails!
I've used the #value# to substitute with 'RDB$DATABASE', but nothing!
Any idea??
My work will stops....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira