ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Chandler" <a...@chandlerfamily.org.uk>
Subject Confused with groupBy
Date Wed, 24 Aug 2005 12:09:49 GMT
Hi 

I am new to this list and iBATIS, but have started to use it (embedded 
within the tapestry framework) for building a small database application at 
home. 

I have read the developers guide, in an attempt to get straight how I am 
going to use iBATIS to meet my needs, and most of it seems very clear.  
However I have got a little stuck understanding properly how to deal with 
complex joins.  In particular, the example given on page 28/29 of the 
developer guide and the use of the "groupBy" attribute to the resultMap 
element. I assume the "quarter" it is refering to is mapped to the 
QuarterNumber column of the BroadcastDate table, but from there on in I am 
lost.  [It doesn't help that my sql knowledge is not 100%, so a select 
distinct with a group by which may or may not match the simplified groupBy 
element in the xml is also confusing me a bit]. 

In an attempt to find out more, I thought the dtd might have some comments, 
and downloaded the one refered to at the head of page 13. 
(sql-map-config-2.dtd).  However, I could find no reference the resultMap 
element. 

In the end, a little digging on http://ibatis.apache.org/dtd/ (ie getting a 
directory listing) revealed that there is a different dtd sql-map-2.dtd. 

So 

1) I think there is a bug in the guide refering to the wrong dtd.  Am I 
correct? [and I don't mean the different domain name either - but I assume 
that in the longer term that it would be more correct to use the 
ibatis.apache.org name rather than the www.ibatis.com] 

2) Could someone give me a more detailed explanation of what the groupBy 
attribute is trying to do. 

3) Why is there a namespace attribute on the sqlMap element and what does it 
do.  I haven't been able to find any previous (to page 28) reference in the 
guide. 

Thanks.
 --
Alan Chandler
alan@chandlerfamily.org.uk 



Mime
View raw message