DAO catch SQLexceptions

2005-12-04 Thread Edwin S Lukaweski
I am using Ibatis Data Access Objects. I cannot figure out how to catch SQLExceptions when using methods like "group = (Group)queryForObject("getGroup", oid);"       I wish to catch the fact that a row may not exist and report the error back to the user. The Data Mapper seems to provide SQL

Re: DAO catch SQLexceptions

2005-12-04 Thread Larry Meadors
That would not throw an exception anyway - the returned object would simply be null. Larry On 12/4/05, Edwin S Lukaweski <[EMAIL PROTECTED]> wrote: > > > I am using Ibatis Data Access Objects. I cannot figure out how to catch > SQLExceptions when using methods like "group = > (Group)queryForObje

Re: [Fwd: How to pass a parameter to collection property?]

2005-12-04 Thread Jozef Hribik
Thank you Jeff, i am using your solution already, but i want to get _categories_with_products_ in single step.   Map map = new HashMap(); map.put("parameterY", parameterY); map.put("parameterX", parameterX); List results = sqlMap.queryForList("getCategory", map); select * from CATEGORY wher