Tuesday, June 1, 2010

Flash Builder Data Centric - Flash Builder - PHP

I have been using the new Data Centric feature in Flash Builder 4 For the past 2 weeks or so and it was an awesome experience from beginning to end until I hit an error where I got stuck for almost a day or so.I Could not solve the problem on my own so I asked around and I got the answer from the Flash Builder team. My project was Flash builder,PHP and mysql database.

Problem Description : Every time I try to delete a record, I get the following error :

ArgumentError: Attempt to use managed delete method with an item that is not managed on this client.

Root cause of the problem : I had enabled Data management for an entity and delete method is part entity’s data service operations

Solution :
If data management is enabled, we can only modify data that is managed/returned by the server. So you can only delete a record if it is returned by the server.

Depending on your application’s logic, you may either want to remove delete operation from Data Management or delete the record after getting a record from the server.
To remove delete operation from entity’s managed operations, Context click on the entity->Enable Data Management ->Click Next-> Set the delete item operation to None.

Thanks,
tareq

7 comments:

  1. Thanks! This post saved my life :)

    ReplyDelete
  2. I still have the problem accessing a MS SQL Server 2005 and the service is not managed.

    ReplyDelete