Hi all,

I have to make the following task but I have a problem. Here is description:

I have 2 beans connected 1:1 relationship 
DataObjectIdentifier - Person

I declare the following relationship in repository_jdo.xml:
     <reference-descriptor
         name="doi"
         class-ref="com.cosmos.jdo.apache.DataObjectIdentifier"
      >
         <foreignkey field-ref="dataObjectId"/>
     </reference-descriptor>

If foreignkey field-ref="ObjectId" everything works fine! (ObjectID is my primary key 
in DataObjectIdentifier) ,
BUT the problem in my case is that I want to implement method in 
DataObjectIdentifier(getDataObjectId)
which will return me some value. I want to make relation to this field dataObjectId.
That's why I pass as argument value to foreignkey field-ref = dataObjectId!!!
Can I make such relation? If yes how can I do this? Here is my exception:
org.apache.ojb.jdori.sql.OjbStoreFatalInternalException: 
org.apache.ojb.jdori.sql.OjbStoreManager.insert
NestedThrowables:
org.apache.ojb.broker.OJBRuntimeException: Incorrect field reference "dataObjectId" in
[EMAIL PROTECTED] delete=false,cascade
retrieve=true,cascade store=false,is lazy=false,class of Items=class 
com.cosmos.jdo.apache.DataObjectIdentifier]
………………….


  

-- 
Best regards,
 Nikolay                          mailto:[EMAIL PROTECTED]



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

Reply via email to