ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Gilbert <Glenn.Gilb...@asx.com.au>
Subject Polymorphism vs SqlMaps
Date Fri, 14 Jan 2005 00:23:03 GMT
Hi all,
 
I've got two objects: 'Accreditation' and a sub class
'AffiliateAccreditation'. 
In the database, both have records in the ACCREDITATION table, but only the
AffiliateAccreditation has a record in the AFFILIATE_ACCREDITATION table.
 
A 'Contact' has a List of Accreditation's which may be instancesof
AffiliateAccreditation (but all are instances of Accreditation)
 
I implemented a method "getAccreditationsForContactID" which uses a
JdbcTemplate to get this an instantiate the relevant object, but now I would
like to be able to use the "getAccreditationsForContactID" within the
Contact sqlMap 
ie: <result property="accreditations" column="contact_id"
select="Accreditation.getAccreditationsForContactID"/> 
 
Any ideas?
We're using iBatis 2.0.9 via Spring, Oracle 9i

Mime
View raw message