Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Data Services
Viewing all articles
Browse latest Browse all 58696

How to use createItem via DataServiceTransaction-API correctly

$
0
0

Hello,

 

I try to create an item via the DataServiceTransaction-API:

 

DataServiceTransaction dtx = DataServiceTransaction.begin(false);

dtx.setSendChangesToAdapter(true);

 

EntityA a = new EntityA();

EntityB b = new EntityB();

a.setEntityB(b);

 

dtx.createItem(EntityA.class.getName(), a);

dtx.commit();

 

When I call this serivce from my FlexClient an error occurred, wich says that EntityB is unsaved!

 

I know why this erro happens but really dont't know how to fix that.

 

Is there any way to make the creation cascading(from the modeler-plugin within FlashBuilder)?

 

or

 

Do i have to create the "child"-properties on my own via another call of "dtx.createItem" with EntityB? If so, how can I check the DataService for the entity, if the entity already exists? via a fill operation? how do call that manually?

       

I know question over question!

 

Hope you can help me out!

 

Cheers

Flavy


Viewing all articles
Browse latest Browse all 58696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>