Hello,

> -----Original Message-----
> From: Reitsam Andreas [mailto:[EMAIL PROTECTED]

> 2003-10-28 11:10:45,307 ERROR [STDERR]
> org.apache.ojb.broker.OJBRuntimeException: Incorrect field reference
> "salesPersonId" in
> [EMAIL PROTECTED]
> delete=false,cascade retrieve=true,cascade store=true,is 
> lazy=false,class of
> Items=interface domain.Price]
>       at
> org.apache.ojb.broker.metadata.ObjectReferenceDescriptor.getFo
> reignKeyFieldD
> escriptors(Unknown Source)


> public class CustomerPriceImpl implements Price {
...
>       private String salesPersonId;
...
>       }
> }



> <!-- mapping interface Price -->
> <class-descriptor class="domain.Price">
>       <extent-class class-ref="domain.CustomerPriceImpl"/>
> </class-descriptor>
> 


> <class-descriptor class="domain.CustomerImpl">

>       <collection-descriptor
>               name="prices"
>               element-class-ref="domain.Price"
                               ^^^^^^^^^^^^^

you might better use domain.CustomerPriceImpl here

>               proxy="true"
>               auto-retrieve="true"
>           auto-update="true">
>         <inverse-foreignkey field-ref="salesPersonId"/>
                                        ^^^^^^^^^^^^^^^
now OJB expects domain.Price to have a field-descriptor
named salesPersonId.

>      </collection-descriptor>         
> </class-descriptor>

I think you have two ways to fix it:

1. make the type of the reference domain.CustomerPriceImpl, or

2. add a field-descriptor for salesPersonId to the 
class-descriptor of domain.Price (I know it is an interface,
but that's o.k.)

HTH,
        Olli

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to