Did you have any lazy references set up in the mappings? -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of pepe_perez_perez_perez Sent: Saturday, March 25, 2006 2:43 PM To: [email protected] Subject: [flexcoders] Saving object graphs 2 (losing backreferences)
Hi,
I'm using data services with the JavaAdapter with the "hierarchical
values approach" and I'm finding that when I invoke commit() from the
client the object graph that I'm receiving in the server after the
unmarshalling to Java is not what I'd expect.
The original object graph that I sent to the client was:
Book <-- Chapters
Each Chapter has a backreference to Book in his "book" property as
you can see below in lines 0010 and 0020 before leaving the server to
the client.
When the client receives the data the "book" backreference is already
lost and it is being represented in the DataGrid as a "0". The relevant
column in the grid is this:
<mx:DataGridColumn headerText='Book' dataField='book' editable='false'/>
The only operation in the client is an update of "description"
in the second book.
On arriving, the response from the client to the server mantains the "0"
as you can see in lines 0030 and 0040.
The update through Spring/Hibernate is succesful but the lines lose
the reference to their parent.
Any suggestion?
Thanks in advance,
Pepe.
0000 22:59:55,528 INFO [STDOUT] [Flex] Serializing AMF/RTMP
response
Version: 3
(Command method=_result (0) trxId=6)
(Typed Object #0 'flex.data.messages.SequencedMessage')
sequenceId = 0
destination = "BookDestination"
headers = (Object #1)
dataMessage = null
correlationId = "8D5C4E2B-EE28-385B-56C1FFFFFFFFEEBE"
messageId = "E789E2A9-080F-067D-798D-A5C0CD0B8062"
timeToLive = 0.0
timestamp = 1.143323995528E12
clientId = "07C1431D-08AB-044B-7C60FFFFFFFFA737"
sequenceProxies = null
sequenceSize = 2
body = (Array #2)
[0] = (Typed Object #3 'model.Book')
date = 2006-01-20
description = "ROSA ROSAE"
library = null
Chapters = (Typed Object #5
'flex.messaging.io.ArrayCollection')
source = (Array #6)
[0] = (Typed Object #7 'model.Chapter')
0010 book = (Ref #3)
description = "CAPITULUM III"
amount = 3000.0
id = 3
id = 2
[1] = (Typed Object #8 'model.Book')
date = 2006-03-20
description = "VANITAS VANITATIS"
library = null
Chapters = (Typed Object #10
'flex.messaging.io.ArrayCollection')
source = (Array #11)
[0] = (Typed Object #12 'model.Chapter')
0020 book = (Ref #8)
description = "CAPITULUM L"
amount = 50000.0
id = 1
id = 6
23:02:48,858 INFO [STDOUT] [Flex] Deserializing AMF/RTMP
request
Version: 3
(Command method=null (0) trxId=7.0)
null
(Typed Object #0 'flex.data.messages.DataMessage')
identity = null
operation = 5
body = (Array #1)
[0] = (Typed Object #2
'flex.data.messages.DataMessage')
identity = (Object #3)
id = 6
operation = 3
body = (Array #4)
[0] = (Array #5)
[0] = "Chapters"
[1] = (Typed Object #6 'model.Book')
uid = "6"
library = 0
id = 6
description = "VANITAS VANITATIS"
Chapters = (Externalizable Object #7
'flex.messaging.io.ArrayCollection')
(Array #8)
[0] = (Typed Object #9 'model.Chapter')
amount = 50000
uid =
"D15DDB97-B537-496D-83C5FFFFFFFFC680"
0030 book = 0
description = "CAPITULUM L"
id = 1
date = Mon Mar 20 00:00:00 CET 2006
[2] = (Typed Object #11 'model.Book')
uid = "6"
library = 0
id = 6
description = "VANITAS VANITATIS"
Chapters = (Externalizable Object #12
'flex.messaging.io.ArrayCollection')
(Array #13)
[0] = (Typed Object #14 'model.Chapter')
amount = 50000
uid =
"D15DDB97-B537-496D-83C5FFFFFFFFC680"
0040 book = 0
description = "CAPITULUM D"
id = 1
date = Mon Mar 20 00:00:00 CET 2006
correlationId =
"BECCBDD3-529B-58DE-AE51FFFFFFFF77A8"
destination = "BookDestination"
timeToLive = 0
timestamp = 0
body = (Ref #4)
clientId = "07C1431D-08AB-044B-7C60FFFFFFFFA737"
headers = (Object #16)
messageId = "E73EE1EE-5253-97D1-68BFFFFFFFFFEA66"
correlationId = ""
destination = "BookDestination"
timeToLive = 0
timestamp = 0
body = (Ref #1)
clientId = "D842E15F-0E0A-5235-911F-43A942DCFE74"
headers = (Object #17)
endpoint = "my-rtmp"
messageId = "BECCBDD3-529B-58DE-AE51FFFFFFFF77A8"
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

