synchronizationsup

Deleted Items are Synchronising


I am using SUP 2.1.3

I've spent the last few hours trying to figure out why any item I delete is being Synchronized with the SUP Cache.

It seems the only way to delete an instance of an MBO you create is to call CancelPending().

I've read the Documentation and it says to call Delete(), but delete doesn't get generated with any implementation.

The Delete function is generated like so:

    public void Delete()

    {

        throw new Sybase.Persistence.NoSuchOperationException();

    }

So when I call CancelPending() on the MBO instance I want to delete, it removes it locally, but when the device Synchronizes it sends all pending objects, including deleted ones, to the Sybase Server.

It appears as though when it performs the Synchronization it is rolling back the deletions sending them to the server then committing the changes on the device.

If anyone on here has any experience with SUP I would greatly appreciate the help

Update: Ok so I have figured out it is only performing a Logical delete not an actual delete, so my question remains how can I delete the object but not Synchronize it with the server?


Solution

  • Ok so I found out the problem. The documentation suggested to call SubmitPending() after each object creation, as it was better for Performance rather then calling SubmitionPendingOperations().

    This was locking the object for Synchronization and wasn't allowing for Delete or Update calls on the objects.

    Removing this and performing a SubmitPendingOperations() to submit the created items just prior to performing the Synchronization solved my problems.

    So lesson to anyone else starting out with Sybase Unwired Platform, only call SubmitPending() when you know for a fact that the are going to be no alterations to the object