users@glassfish.java.net

Re: how to join with discriminator column?

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Sep 2008 19:01:01 PDT

Hi,
I do not understand exactly how and when toplink/glassfish discovers and set the relationship field. I tried setting insertable=false, updatable=false, nullable=false but still doesn't work. The relationship of the two tables is similar to the illustration below.

        vehicle owner (discriminator column: vehicle_type_id char(1))
    +----------^---------+
car owner motorcycle owner
(dvalue: 'c') (dvalue: 'm')

        vehicle type
    +---------^----------+
   car (id: 'c') motocycle (id: 'm')

I employs single table strategy for vehicle owner. How do I get the vehicle type entity from vehicle owner subclass entities? Is it supported at all?
Thanks.
[Message sent by forum member 'phuihock' (phuihock)]

http://forums.java.net/jive/thread.jspa?messageID=297321