Order of definition when extending resultMap and using subMap

2009-05-11 Thread Chad McHenry
I'm having issues extending resultMap and using subMap. Like sql includes, the order in which the referencing elements are defined make a difference, except that for 'extends' and , only if the resultMaps are in different files/namespaces. When resultMap B extends resultMap A (when defined in separ

RE: error handling in iBatis?

2009-05-11 Thread Winarto
Hi, I believe you're using Spring-DAO with IBatis as ORM. The method getSqlMapClientTemplate().queryForList is actually throwing DataAccessException. However since it is inheritance of RuntimeException, you do not need to explicitly catch it. But yes, you can catch it if you want. Cheers

Re: error handling in iBatis?

2009-05-11 Thread Sundar Sankar
I guess you can use the same kinda code to catch exception. I batis does throw SQLException for errors. If you are using Spring, then it is wrapped to something else (DAOException, I think). You could throw back custom exception or a new SQLException when the size doesnt match ur need. I would hav

Re: error handling in iBatis?

2009-05-11 Thread Nathan Maves
You can see from the java docs that each method does infact throw a SqlException. http://ibatis.apache.org/docs/java/user/com/ibatis/sqlmap/client/SqlMapExecutor.html You need to be prepared to catch them if you care to do anything with them. Nathan On Mon, May 11, 2009 at 9:26 AM, Bhaarat Sharm

error handling in iBatis?

2009-05-11 Thread Bhaarat Sharma
we have been using iBatis for a while now. However, we do not perform any error handling while executing the sql maps. Back when we used java code to connect, we used try and catch blocks. Where the catch block would log an error message. something like this: try { C

Re: HELP NEEDED : Bidirectional associations

2009-05-11 Thread Clinton Begin
Currently, the trick is to ensure that you have caching enabled for those statements (caching of any configuration, other than weak reference caching, will work). This is not ideal and is solved by iBATIS 3.0, which is just around the corner. Clinton On Mon, May 11, 2009 at 6:54 AM, RO86 wrote:

HELP NEEDED : Bidirectional associations

2009-05-11 Thread RO86
Hi, All Suppose this sitiuation DB Tables: A(ida, desc) , B(idb, ida, desc) Java Classes: public class A{ String ida; String desc; List Bs; } public class B{String idb; String desc; A parentA;} I am new to iBatis and I am trying to work around thi