Follow Nathan's suggestion.
Look up ping query in the developers manual. It will validate the query
before it uses it
In fact it will validate connection, discard the old one if necessary and
opens/return fresh one.
On Tue, Apr 14, 2009 at 11:13 PM, yhliu yh...@cn.ufinity.com wrote:
Thanks
Did you do a compare of the JCC log for the same application run with
a - the glassfish connection pool
b - the ibatis SIMPLE datasource
thanks
Mario
Jeff Hibbs
I have generated a number of sqlMaps using ibator. These are working great,
but now I would like to take advantage of compound properties to avoid N+1
issues. I would like to minimize the amount of handwritten sqlmap code, and
reuse ibators output as much as possible, so in the resultMap for the
hi,
in fact, in sql, I can write update foo_table set column=column+1 where
name='abc'.
It resets the new value with one sql.
but how can I do that in ibatis with one statement, not by three statements:
one gets the value, then add 1, then set the new value?
BTW, Can I do it by JDBC?
Thanks
You would say:
update name='blah'
update foo_table set column=column+1 where name='abc'
/update
Larry
As far as I know, MySQL is the only database that supports qualifying
column names with the table. It is not standard for JDBC so it won't
work in general.
The only way to avoid this problem in most databases is to alias the
column names so they become unique in the request set. Ibator will
Ok, that worked for me. I am able to copy/paste the fields from the
generated selects, and reuse the generated resultMaps. Thanks for the quick
response.
...Chad
== ibatorConfig.xml ===
...
table tableName=person alias=p /
table tableName=location alias=loc /
...
==