This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Query from View using iBatis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Query from View using iBatis" Watch "Query from View using iBatis" New topic
Author

Query from View using iBatis

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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?
Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Query from View using iBatis
 
Similar Threads
Bean creation Exception
How to access resultmaps from another existing result map in iBATIS 2x
IBATIS - multiple parameter
How to retrieve metadata in ibatis
SqlMap problem in Spring-ibatis integration app