If you could send me the server debug log with Message.* and Service.* enable I 
could tell what is happening.   I've seen this type of behavior in the past, 
but only when some query or something was holding onto a cached copy of the 
deleted item.   After the item gets deleted, we could be refreshing a query or 
something and then seeing that cached item and thinking it needs to get added 
back to the collection.

If I recall correctly though, you are using the hibernate assembler which 
shouldn't be caching queries - unless maybe you have turned on the cached 
queries option or maybe have customized the assembler?

Another possibility is that you might have a bi-directional association 
involving this item and you are not removing the item from both sides of the 
relationship.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
zdenekmikan
Sent: Monday, August 18, 2008 7:47 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: LCDS 2.6 + Hibernate: problem deleting items


More details to first issue (delete item with ds.deleteItem):

The item is in fact deleted from the database, just the display in my
application is wrong - when I restart application, the deleted item is
really deleted.

In client log (in Flex Builder) there are following lines after commit:

Updating cached item for: Parent#:#254 excluding properties: null
Adding item to cache: ChildItem#:#272 destination: ChildDestination
About to dispatch commit result events

where 272 is the id of the item I am trying to delete.

TIA for any help.

Zdenek M

--- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Zdenek 
Mikan <[EMAIL PROTECTED]> wrote:
>
> I have got big problems deleting items from my managed collections:
>
> When I delete item through ds.deleteItem and then call the ds.commit,
> after return from the commit operation my item is back in the
> ArrayCollection. The second time this item is deleted properly.
>
> When I delete item through ac.removeItemAt the item is again
restored by
> commit, but this time it is impossible to delete this item by the
second
> call.
>
> When I delete item from the collection and add another item into the
> same collection, the commit fails and the server returns error "The
item
> was not in the cache..."
>
> Does anyone know how to fix these problems? My items have to be
> improperly cached somewhere...
>
> TIA Zdenek
>

<<inline: image001.jpg>>

<<inline: image002.jpg>>

Reply via email to