AFAIK, ojb doesn't support referece/collection inherence !
I have some patches, which only work for collection descriptors, that
add collection descriptor to all elements of an extent ! If you wnat I
can send you the pacthes !
On Tue, 2003-10-14 at 13:26, Christopher C Worley wrote:
> Hi all,
>
> I was wondering if this is the way ojb is meant to operate when
> references and inheritance are combined. What I have are the tables
> listed below which are mapped to class Party, Person and
> PartyRelationship where Person extends Party. In the Party class
> descriptor I have a collection-descriptor named partyFromRelationships
> for PartyRelationship and the inverse key partyFromId. Well if I query
> Person I get error saying that the partyFromRelationships do not exist.
> If i copy the collection-descriptor for partyFromRelationships from
> Party to the Person class descriptor I can query Person with criteria
> involving partyFromRelationships.
>
> The classes are mapped as multiple joined tables.
>
> Am I doing somthing wrong in my code or is it meant to be?
>
> thanks,
> -chris worley
>
> ----- code --------
> Criteria criteria = new Criteria();
> criteria.addEqualTo("partyFromRelationships.relationshipTypeId",
> "EMPLOYMENT");
> employers =
> broker.getCollectionByQuery(QueryFactory.newQuery(Person.class,
> criteria));
>
> ------ tables ------
>
> PARTY
> -----------
> partyId
> partyTypeId
>
>
> PERSON
> ------------
> partyId
> firstName
> lastName
>
> PARTY_RELATIOSHIP
> ------------------------
> partyFromId
> partyToId
> relationshipTypeId
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://db.apache.org/ojb
http://xingu.sourceforge.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]