You are right that the SELECT would only return the record if it was
in BOTH tables. In theory (if you insert everything through castor)
you wont have a case where something is in the extended table that is
not in the first.

Hope this helps!

-Nick Stuart



On Fri, 08 Oct 2004 11:48:57 -0600, Eric Anderson <[EMAIL PROTECTED]> wrote:
> 
> If I map a class as extends to two different database tables. Like so.
> 
> <class name="PatientSearchForm" identity="patientId">
>         <map-to table="WWW_PATIENTS_ENTRY"/>
> blah....
> </class>
> 
> and
> 
> <class name="PatientInfoForm" identity="patientId"
>         extends="PatientSearchForm">
>         <map-to table="WWW_PAT_ADULT_INFO"/>
> blah..
> </class>
> 
> When I do a SELECT p FROM org.usiis.struts.PatientInfoForm p WHERE
> patientId=$1 it only returns an object if it exists in the
> WWW_PAT_ADULT_INFO, both but not only WWW_PATIENTS_ENTRY.
> 
> If the second extends the first, should it return an object if it
> exists only if the table it extends? Doesn't seem to work this way...
> 
> Any help (still pretty new to castor).
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-user
>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to