Thanks for the help Atul. The concept is clear to me now.

So I just wanted to test that out. Instead of setting primary key value
from parameters, I thought of giving a hard coded value as follows.

<set field="dataResourceId" from-field="STDWRAP001"/>
<entity-one entity-name="DataResource" value-field="currentValue"/>
<set field="dataResource" from-field="currentValue"/>

where "STDWRAP001" is a valid dataresource id which exists in database. But
this is what I get in console.

*PrimaryKeyFinder.java:153:INFO ] Returning null because found incomplete
primary key in find: [GenericEntity:DataResource][dataResourceId,null()]*

What went wrong here?



On Mon, Jan 7, 2013 at 12:04 PM, Atul Vani <atul.v...@hotwaxmedia.com>wrote:

> Whatever are the primary keys of the entity DataResource, will be searched
> in the "context".
>
> Why primary keys? because you are using entity-ONE.
>
> And the context is where you are setting variables, dataResourceId in line
> 1, currentValue in line 2 and dataResource in line 3.
>
>
> On Mon, 07 Jan 2013 11:49:20 +0530, Winster Jose <wins...@chathurangam.net>
> wrote:
>
>  Hi,
>>
>> Can anyone please help me to understand below xml?
>>
>> Please correct me if I am wrong. "dataResourceId" is taken from parameters
>> and set to field "dataResourceId". And DataResource entity is fetched (but
>> which will act as primary key here?) and set to field "currentValue" and
>> later "currentValue" is assigned to another field "dataResource".
>>
>> <set field="dataResourceId" from-field="parameters.**dataResourceId"/>
>> <entity-one entity-name="DataResource" value-field="currentValue"/>
>> <set field="dataResource" from-field="currentValue"/>
>>
>>
>> Regards
>> Winster T Jose
>> Director - Technology and Architecture
>> Chathurangam Creative Solutions Private Ltd.
>> Cell: +91-98469 31020
>> Mail: wins...@chathurangam.net
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>



-- 
Winster T Jose
Director - Technology and Architecture
Chathurangam Creative Solutions Private Ltd.
Cell: +91-98469 31020
Mail: wins...@chathurangam.net

Reply via email to