Managing session opened with external connection

2006-02-08 Thread Joel Costigliola
Hi all, I would like to use iBatis on my project. I have some constraints : - I need to use a connection management mecanism external to iBatis. - I need to use a transactionnal mecanism external to iBatis (not EJB but another one). Following the javadoc example I have successfully inserted an

OT: Need Help with SQL Join

2006-02-08 Thread Zoran Avtarovski
I have a parent:child table relationship using a Join SQL statement and I am having trouble getting it right. One parent many children. The starting statement is: SELECT * FROM Users as U left outer join UserCat as UC on U.user_id = UC.user_id This simple statement returns all content from

Re: OT: Need Help with SQL Join

2006-02-08 Thread Vincent NICOLAS
And this simple statement ? SELECT * FROM Users as U left outer join UserCat as UC on U.user_id = UC.user_id WHERE U.status = 1 AND UC.status = 1 Zoran Avtarovski a écrit : I have a parent:child table relationship using a Join SQL statement and I am having trouble getting it right. One parent

Re: OT: Need Help with SQL Join

2006-02-08 Thread Zoran Avtarovski
I tried that but that's not what I need. If I had three users (U1, U2, U3). And their status = 1. They each have three children UserCats U1C1, U1C2, U1C3, U2 C1, U2C2 , ..., U3C3 All of U1 usercats have status = 1, U2 has 1 usercat status = 1 and U3 has none, I want to get a table like

Re: RE nedd help with sql

2006-02-08 Thread Zoran Avtarovski
This is what I tried first but it threw an SQL error. Z. I think you can use a sub query so SELECT * FROM Users as U left outer join ( Select FROM UserCat WHERE status = 1 ) UC on U.user_id = UC.user_id WHERE U.status = 1 Steve This e-mail and any attachment is for authorised

about the iterate usage

2006-02-08 Thread stevenlou
Dear all, I know iterate is of java.util.List, so I have to initial the length for the array in Java. Generally it use brackets[]. iterate property=fruits conjunction=, (#fruits[].id#, #fruits[].name#) /iterate Now I need insert some data, and the length is not fixed. So can I use the arraylist

Re: OT: Need Help with SQL Join

2006-02-08 Thread Ted Schrader
Hi Zoran, Try moving the status criteria for UserCats to the LEFT OUTER JOIN instead of the WHERE: SELECT * FROM Users as U LEFT OUTER JOIN UserCat as UC on U.user_id = UC.user_id AND UC.status = 1 WHERE U.status = 1 Keeping UC.status in the WHERE clause would filter records

pass a result (a String) of a query to another SQL

2006-02-08 Thread VIJAISENTHIL, P. K.
Hi, I have a situation like,I need to pass a result (a String) of a query to another SQL as parameter. E.g. like this. SELECTSCORING_LEVEL FROMASSESSMENTS WHERE ID = 12; IF SCORING_LEVEL="THIS" SELECTSUBJECT, MARK FROM SCORES WHERE SUBJECT_ID = 13; ELSE SELECTSUBJECT,

Re: pass a result (a String) of a query to another SQL

2006-02-08 Thread Ted Schrader
Hi Vijai, I have a question about your question: Will Assessments.ID be the same as Scores.subject_id and Subject.parent_subject_id? They are different in your example (12 and 13), but I was wondering if that was a typo. Thanks, Ted On 08/02/06, VIJAISENTHIL, P. K. [EMAIL PROTECTED] wrote:

Re: pass a result (a String) of a query to another SQL

2006-02-08 Thread VIJAISENTHIL, P. K.
Yea, that would different as in my example, bcos the assessment would be associated with a subject. The constraint is, based on the scoring level of the assessment either i need to score a subject directly or the outcomes of the subject. Hope you got me. Thanks -Vijai -

Re: pass a result (a String) of a query to another SQL

2006-02-08 Thread VIJAISENTHIL, P. K.
I have done it with SQL itself using DECODE function in oracle, but curious of whether this can be done through iBATIS Thanks Vijai - Original Message - From: VIJAISENTHIL, P. K. [EMAIL PROTECTED] To: user-java@ibatis.apache.org Sent: Wednesday, February 08, 2006 1:51 PM Subject: Re:

RE: about the iterate usage

2006-02-08 Thread Niels Beekman
Hi, I'm not sure I understand your question, but the iterate-tag supports (amongst others) all Collection implementations (so ArrayList is supported) and arrays. You do not have to change anything in your first query to make it work. The []-syntax is there to let iBATIS know it should retrieve

RE: Different Number of Columns in resultClass with xml and with HashMap

2006-02-08 Thread Yusuf
Hello, regarding my last question, let me simplify this question: I have a resultMap that contains another select statement that populates one of the column, If the resultMap contains 10 column, which 2 of them contains another select statement, then this is what happens: - if i map the

Re: Very new to ibatis -- help required.

2006-02-08 Thread Larry Meadors
There are 2 things here that jump out as bad ideas: 1) Using M$ Access for *anything* Java-related 2) Hijacking another thread and adding your questions to it So, I would suggest you get either MySQL or PostregreSQL or...well, almost ANYTHING would be a better choice than Access (except for

ibastis mapping performance

2006-02-08 Thread a b
hi, is there articles that compare the orm mappers out there for mapping performance? i.e. after i get a query result how long does it take to generate the object, and what if the resultset is like a million of records thanks __ Do You Yahoo!?