Highlighted

HibernateAssembler problem loading object

Avatar

Avatar

anoweb

Avatar

anoweb

anoweb

22-07-2008

I'm using LCDS (LiveCycle Data Services) 2.5.1 and I am
trying to load a Java object using hibernate and have it given to
my flex client.



I followed this tutorial:
http://blog.comtaste.com/2007/07/livecycle_data_services_and_hi.html



Only issue is that when I attempt to use the DataService
object (in flex client) to do a "getItem" I get the following
error:



Missing identity properties: id



My "data-management-config.xml" has this:

<destination id="hibernatePerson">

<adapter ref="java-dao" />

<channels>

<channel ref="my-rtmp" />

</channels>

<properties>


<source>flex.data.assemblers.HibernateAssembler</source>

<scope>application</scope>

<metadata>

<identity property="id" />

</metadata>

<server>


<hibernate-entity>foo.bean.Person</hibernate-entity>


<update-conflict-mode>PROPERTY</update-conflict-mode>


<delete-conflict-mode>OBJECT</delete-conflict-mode>

<fill-configuration>

<use-query-cache>false</use-query-cache>

<allow-hql-queries>true</allow-hql-queries>

</fill-configuration>

</server>

</properties>

</destination>



Any ideas?

Replies

Avatar

Avatar

anoweb

Avatar

anoweb

anoweb

22-07-2008

I got it. After reading some of the documentation on
DataService.getItem I learned that the "ItemReference" object that
is given back extends "AsyncToken". This means you should either
bind to the "result" property of the ItemReference or add a
responder to it (i.e. itemRef.addResponder).



Then once the data is retrieved your "result" or "fault"
methods (from the mx.rpc.IResponder interface) will be
invoked.