ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Engel, Gregory A" <GAEn...@Tribune.com>
Subject RE: Simple questions
Date Thu, 16 Nov 2006 14:48:18 GMT
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:dboussebha@yahoo.fr] 
Sent: Thursday, November 16, 2006 7:39 AM
To: user-java@ibatis.apache.org
Subject: Re: Simple questions

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
> <select id="getMatchScoreByID" parameterClass="int"
> resultMap="matchScoreResult ">
> SELECT * FROM matchs_scores WHERE match_score_id = #value# </select>
> 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 
> MatchScore-s

View this message in context:
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message