Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Saving many entities at the same time with LCDS

imran_issufo
Level 2
Level 2

Hi,

i am new in Adobe Lifecycle Data Service,

i am using adobe flash builder with and doing model-driven development with LiveCycle Data Services ES,

I have i dificult about saving two entites at the same time, for example i need to save in data base a invoice and invoice items on a SAVE click

the model plugin created for me separated forms for each one ... one for INVOICE and another for INVOICE ITEM...i created my own where i introduce invoice details like customer name, etc,

and i dinamically create items and insert in a editable datagrid where i introduce the quantities for each item.

My dataservice for both entities are set to autocomit FALSE

My question is ... how do i save the invoice entity first and relate this invoice with items at the SAVE button click?.

When i do separaltly(first register the invoice, after one by one register the items) it works fine...

regards,

Imraan

2 Replies
Ashish_Vashisht
Level 3
Level 3

Try creating a relationship between the two entities in the Fiber model. Add a property to Invoice called items, set the type to InvoiceItem and then mark as true the this is a collection checkbox. This should allow you to save the Invoice along with its items...

imran_issufo
Level 2
Level 2

Hello Ashish Vashisht,

thank you very much!!!!!

That resolved my problem, i need to add also a parameter cascadeCommit = true to the commit method.

One again... thankx