ibatis, eclipse, and tomcat

2006-07-21 Thread Aaron Luke
Hi-These are 2 newbie questions...  I searched everywhere for the answer... if i do get the answer (if it didn't exist elsewhere), I promise to put it up in a tutorial for people looking to do the same...All I'm trying to do is make my way through the iBATIS SQLMaps tutorial ( http://cvs.apache.org

Re: Mapped statement with chained queries ?

2006-07-21 Thread Fred Janon
Hi Nathan, Which developer guide are you referring to? Version 1 or 2? Data Mapper? I couldn't find anything on pages 36 in any of the guides I have, v1 or 2. Thanks Fred Nathan Maves wrote: Although your solution will work, I would suggest another. With your way you run into the classic n

Re: Mapped statement with chained queries ?

2006-07-21 Thread Fred Janon
Thanks Nathan, but I should have said that actually that's the other way around: a client has many jobs that has many tasks. So getting the client name for a task is a 1 to 1 mapping. I would not mind solving the problem with an outer join or a subquery but so far I haven't been able to write a

Re: Urgent help needed -- queryForList() problem

2006-07-21 Thread Nathan Maves
Could use please post your sqlMap query and result map. On Jul 21, 2006, at 9:57 AM, [EMAIL PROTECTED] wrote:     Hi,      In my application I am using Ibatis as datamapper and firebird as the backend.   In my database, I have 10 records and I want to get first 5 of them.   Here I am using    

Re: Mapped statement with chained queries ?

2006-07-21 Thread Nathan Maves
Although your solution will work, I would suggest another.  With your way you run into the classic n+1 problem.  One query to get the tasks, then n number of queries to get the jobs for those tasks.  You get the point.  That is why this is not the preferred way.Try to use the build in group by func

Urgent help needed -- queryForList() problem

2006-07-21 Thread rambabu.piridi
    Hi,      In my application I am using Ibatis as datamapper and firebird as the backend.   In my database, I have 10 records and I want to get first 5 of them.   Here I am using sqlMap.queryForList("getUsersList", null, 0, 5) to retrive the first 5 records from the databas

Re: Mapped statement with chained queries ?

2006-07-21 Thread Debasish Dutta Roy
You can do this in a simple manner. In the resultmap you need to provide the values properly. Here is an example.Here is the resultmap for Task    other properties ---    --- Your select for task ---  --- other properties ---   -- select statement for getting job info--  

Getting NullPointer exception in SqlMapDaoTemplate

2006-07-21 Thread leonard . reinstein
I am getting a NullPointer Exception when trying to update in Oracle. It only happens sporadically. I.e., it may work several times in a row, then it would fail once and then it would work again. We looked at the code and cannot understand why this is happening. And the line in the Ibatis source co

Mapped statement with chained queries ?

2006-07-21 Thread Fred Janon
Hi, I have 3 tables: Tasks: taskid int PK jobid int FK description String Jobs: jobid PK clientid int FK Clients: clientid PK clientname String. How can I get the Clients:clientname via the Jobs table starting from a taskid? I know how to do it with 1 level on "indirection" but I don't know

RE: lists as parameterClass

2006-07-21 Thread Morone, Bill
Actually, one key part of a lightweight SOA - 2T + 1 I call it. But that is blog material. -Original Message-From: Morone, Bill [mailto:[EMAIL PROTECTED]Sent: Friday, July 21, 2006 8:19 AMTo: user-java@ibatis.apache.orgSubject: RE: lists as parameterClass Brandon,   Thanks for the q

RE: lists as parameterClass

2006-07-21 Thread Morone, Bill
Brandon,   Thanks for the quick reply. It works like a charm. I had one lexical error (oh, to be human) and a few bogus column names.   I salute all the fine developers of iBatis SQLMaps. I am one of the select few "straight to xml" guys (just a select statement) -- I rigged up a nice little