Re: Simple questions

2006-11-16 Thread Koka Kiknadze
I must to use a queryForObject and no a queryForList In your setup if you execute: queryForObject("getMatchList", 5) it will retrieve single Match object having match_id = 5 with child matchScores list populated. if you execute queryForList("getMatchList", 5) it will return List containing all Ma

RE: Simple questions

2006-11-16 Thread Engel, Gregory A
Try changing to a left join on the match scores table LEFT JOIN matchs_scores ON matchs_scores.match_id =matchs.match_id -Original Message- From: soussou97 [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 7:39 AM To: user-java@ibatis.apache.org Subject: Re: Simple questions

Re: Simple questions

2006-11-16 Thread soussou97
Hi Koka; My question is how get a instance of Match having child MatchScore list populated? Normally its a Match object I must to use a queryForObject and no a queryForList ? Koka Kiknadze wrote: > > Well, if you want specific MatchScore object add another query > > resultMap="matchScoreRes

Re: Simple questions

2006-11-16 Thread Koka Kiknadze
On 11/16/06, soussou97 <[EMAIL PROTECTED]> wrote: I does not understand your response ? With the new version of Ibatis is possible to execute one only query to load all data: match+list of scores ? Yep, it is. But that does not mean you have to use same approach if you ONLY need a MatchSc

Re: Simple questions

2006-11-16 Thread soussou97
Hi Koka; I does not understand your response ? With the new version of Ibatis is possible to execute one only query to load all data: match+list of scores ? Koka Kiknadze wrote: > > Well, if you want specific MatchScore object add another query > > resultMap="matchScoreResult "> > SELECT *

Re: Simple questions

2006-11-16 Thread Koka Kiknadze
Well, if you want specific MatchScore object add another query SELECT * FROM matchs_scores WHERE match_score_id = #value# and use queryForObject. In your example you get instance of Match having child MatchScore list populated bu iBatis, i.e. it's for retrieving Match-es not specific MatchSco

Re: Simple questions

2006-11-16 Thread soussou97
Hi Jeff; I have the following example : Beans : Public class Match { private int matchId; //get & set private List matchScores; //get & set } Public class MatchScore { private int matchScoreId; //get & set private int matchId; //get & set private int score; //get & set private int position; /

Re: Simple questions

2006-11-14 Thread Jeff Butler
I suppose there is a language issue here - I do not understand your question. Maybe if you posted some Java code and XML we could help. Jeff Butler On 11/14/06, soussou97 <[EMAIL PROTECTED]> wrote: Hi Jeff; In the developer's guide or in the question "How do I get around the N Plus 1 selec

Re: Simple questions

2006-11-14 Thread soussou97
Hi Jeff; In the developer's guide or in the question "How do I get around the N Plus 1 selects problem" I'am sorry but the call : getProductListByCategory with the input parameter cat_id must returns a object of type "com.ibatis.example.Category" but no a list ? I search only one category object

Re: Simple questions

2006-11-14 Thread Jeff Butler
Please stop asking the same question over and over again.   1. Please read the developer's guide regarding N+1 queries and complex properties   2. Do you have a question about multiple databases, or is this just a statement of fact?   Jeff Butler  On 11/14/06, soussou97 <[EMAIL PROTECTED]> wrote: H