I am using iBatis (2.5) with DB2 version 8.x and Spring 2.5. Is there any issue in querying a view (as opposed to table)? It is a very simple select as:
org.impl.CodeBean is a simple POJO with String attributes only with public getter and setter. StringTrimTypeHandler are custom code written.
My SQL are working when I am using table, as opposed to View.
When I call the above findAll from JUnit for View, I get exception as:
I must be missing something.
Query from View is supported in iBatis, correct?
Joined: Jul 21, 2003
The view exists in DB2 for that schema. I can successfully run the generated SQL (that is generated by iBatuis by querying the View) in DB2 and get correct result.
While there is no table with the name V_MY_VIEW, there is view with the name V_MY_VIEW. The error code 42704 is thrown if table is not found. But the goal here is to run against the View and not the table.
I am not clear why 42704 error is thrown while I was primarily querying the view.