That error should definitely not be happening in this situation. Can you send the client and server debug logs for this case? You might try a different mode for your association (i.e. the room.users many-to-many tag)... if it is load-on-demand=true or using paging, try turning that off. If it does not have lazy=true, you might try adding that attribute.
Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Besite - Bart Sent: Monday, January 26, 2009 1:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS : Managed Associations - Null identity map for destination Hello, I have a managed assocation between two objects. I have rooms and users. There is a one-to-many relationship between rooms and users. When a user wants to join a Room, he first requests the Room-object using getItem() : public function joinRoom(roomId:int):void { var responder:mx.rpc.Responder = new mx.rpc.Responder(resultHandler, faultHandler) itemRef = ds.getItem({roomId:roomId}); itemRef.addResponder(responder); } Then in the responder method, I add a new User-object to the the arrayCollection users within the Room-object. I don't give this new user an id, because the id is generated on the server : private function resultHandler(event:ResultEvent):void { var room:Room = event.result as Room; var user:User = new User(); user.roomId = room.id; user.name = this.nickName; room.users.addItem(user); ds.commit(); } This results in the following error server side : Null identity map for destination: user:java.lang.Throwable at flex.data.ItemIdentity.toItemIdentity(ItemIdentity.java:128) at flex.data.SequenceManager.toItemIdentity(SequenceManager.java:3916) at flex.data.SequenceManager.toItemIdentities(SequenceManager.java:3930) at flex.data.SequenceManager.getDSidsHeader(SequenceManager.java:1088) at flex.data.SequenceManager.getSequencedMessage(SequenceManager.java:1663) at flex.data.SequenceManager.getPageFromSequence(SequenceManager.java:1028) at flex.data.DataService.serviceMessage(DataService.java:458) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882) at flex.messaging.endpoints.RTMPConnection.handleTCCommand(RTMPConnection.java:722) at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1021) at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:514) at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:123) at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:778) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) How can I prevent this error ? In the data-management-config.xml the user-destination has the following identity property : <identity property="id" undefined-value="0"/> PS. Earlier in my application I added a new user-object to a newly created Room and I didn't get this error Kind regards, Bart
<<inline: image001.jpg>>
<<inline: image002.jpg>>