ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson Forteleza" <afortal...@gmail.com>
Subject Question about Inheritance Support
Date Thu, 28 Sep 2006 13:05:05 GMT
Hello ! I'm new to iBatis and I'm trying to setup resultMaps with
inheritance support. I've read the Data Mapper Guide v1.5.1 section
3.5.6but the case studied there is not the same as the case I have
here, my case
is really simple, I have 2 tables and 2 classes:

Person
=====
PersonID
Name
Address

Student
======
StudentID
PersonID
Grade

public class Person { ... }

public class Student : Person { ... }

My idea was that I could setup 2 resultMaps, Person and Student, and relate
them with inheritance, meaning that when I called the resultMap for the
Student it would also call the resultMap for Person, but I don't know if
that is possible. Can somebody give me a hand on how to deal with that
problem ? I just didn't want to have one select for Person and a JOIN select
for Student.

thank you
Anderson Fortaleza

Mime
View raw message