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]
