You sould use the discriminator tag

On 11/9/05, Gilles Bayon <[EMAIL PROTECTED]> wrote:
Yould use the discriminator tag


On 11/9/05, Hongbo HE <[EMAIL PROTECTED]> wrote:
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


Reply via email to