I've been using the hibnerateassembler to update parent and insert child record into db on the lcds server and then using the beanproxy to try to push the updates back to the client. The parent update is received by the client but not the child record;
here's what I'm currently trying to do
BeanProxy proxy = new BeanProxy(parent)
parent.setvalue("col1",val);
parent.setValue("col2",val2)
BeanProxy bp = new BeanProxy(parent.getValue("child"));
bp.setValue("col1",child.val);
bp.setValue("col2",child.val);
DataServiceTransaction dtx = DataServiceTransaction.begin(false);
dtx.createItem(ChildService,child);
dtx.updateItem(ParentService, parent, oldParent, null);
dtx.commit(); // done telling lcds
what am I doing wrong?
thanks in advance
chuckles
Views
Replies
Total Likes
Hi Chuckles,
A few questions:
1. How are you declaring your destination in datamanagement-config.xml?
2. The above code also looks suspect and is incomplete: E.g. you have declared a proxy for the parent and child and don't even use it anywhere.
3. Also, why do you need a beanproxy, when you can directly pass the value object to DST. LCDS will ensure that the object is sent appropriately to the client. Try it out
Rohit
Views
Replies
Total Likes
Unfortunately the code fragment I posted is a temporary compromise between using the data management on the server and fml generated data access on the client. I've been unable to the the client fml generated code to recognize the hibernate assembler due to suspected differences between flashbuilder 4.5 and lcds 3.1. This was discussed in a prior post. I using the workaround of packing/unpacking client traffic using the bean proxy until I can upgrade everything to 4.6 (soon I hope).
At the time it was a single table so it wasn't too onerous, now we've refactored and added a child table.
To answer your questions the parent and child destinations are configured in the data management config and I'm using them in the sections of code that I didn't bother to post. I've using the pareent proxy for a while and just added the child proxy and this is what I'm trying to figure out now.
From: "Rohit . Kumar" <forums@adobe.com<mailto:forums@adobe.com>>
Reply-To: "jive-1746941640-9tro-2-2h1mi@mail.forums.adobe.com<mailto:jive-1746941640-9tro-2-2h1mi@mail.forums.adobe.com>" <jive-1746941640-9tro-2-2h1mi@mail.forums.adobe.com<mailto:jive-1746941640-9tro-2-2h1mi@mail.forums.adobe.com>>
Date: Fri, 20 Jan 2012 06:52:58 -0800
To: Chuckles McGregor <mcgregor1@llnl.gov<mailto:mcgregor1@llnl.gov>>
Subject: how to push child record using beanproxy?
Re: how to push child record using beanproxy?
created by Rohit . Kumar<http://forums.adobe.com/people/Rohit.Kumar> in LiveCycle Data Services ES - View the full discussion<http://forums.adobe.com/message/4154490#4154490
Views
Replies
Total Likes
Hi Chuckles,
Would you mind pointing me to that forum thread once again. Let's try and solve the root cause.
Thanks,
Rohit
Views
Replies
Total Likes
I got to this point from this discussion:
lcds 3.1 hibernateannotations problem
anyways we got the go ahead to upgrade to 4.6 and I'll be starting that effort soon so I may be able to clear this up
Views
Replies
Total Likes