I am having a problem with class hints. They do not seem to work all
the time with my configuration. If the PartyContactMech object is
stored in the same instance of the server process that I retreive it in
PartyContactMech.contactMech is populated with an instance of
CPhoneNumber or CPostalAddress. If I try to reteive a records that were
created in a previous instance of the process then
PartyContactMech.contactMechs is populated with an instance of ContactMech.
Integer partyId = (Integer) getParameter("partyId");
Criteria crit = new Criteria();
crit.addEqualTo("partyId", partyId);
crit.addPathClass("contactMech", CPhoneNumber.class);
Criteria critAddress = new Criteria();
critAddress.addEqualTo("partyId", partyId);
critAddress.addPathClass("contactMech", CPostalAddress.class);
crit.addOrCriteria(critAddress);
Query query = QueryFactory.newQuery(CPartyContactMech.class, crit);
Collection partyContactMechs = getBroker().getCollectionByQuery(query);
setParameter("partyContactMechs", partyContactMechs);
<class-descriptor
class="net.enterprise.common.model.contact.CContactMech"
table="contact_mech"
>
<extent-class
class-ref="net.enterprise.common.model.contact.CPhoneNumber"/>
<extent-class
class-ref="net.enterprise.common.model.contact.CPostalAddress"/>
<field-descriptor
name="contactMechId"
column="contact_mech_id"
jdbc-type="integer"
primarykey="true"
autoincrement="true"
/>
<field-descriptor
name="contactMechTypeId"
column="contact_mech_type_id"
jdbc-type="varchar"
/>
</class-descriptor>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]