ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hongbo HE <h...@yahoo.com>
Subject 1:1 with abstract class
Date Wed, 09 Nov 2005 18:14:01 GMT
I have a 1:1 relation of 2 tables. Multiple subClasses
is mapped to  one of them
 
Order
(id,
entityId,
...
)

Entity
(id,
type,
...
)

type is the discriminator.

Order {
 long id;
 Entity entity;
}

abstract Entity {
 long id;
}

Instructor extends Entity {
}

Student enxteds Entity {
}

I'd like to get an order together with its entity
either Instructor or Student, I can't use the 
dot.notation.to.specify.the.properties, since
it will try to instantiante an Entity class, which
is not I wanted.

Any help is greatly appreciated,

Hongbo


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Mime
View raw message