REST Services and PersistenceTools

I heavily use PersistenceTools in the Entity Listeners of our web application to determine when fields have changed and when Compositions have been added/removed/changed as well. We have a lot of logic and we depend on PersistenceTools a lot. What surprised me is that now that I’m trying to work with the REST services, the PersistenceTools is telling me that just about everything is dirty even though I know that the values haven’t changed. Is this a bug? Are there any methods I can use to reset the dirty fields or get an accurate list?

Thanks.

Maybe you mean PersistenceTools?
PersistenceHelper has no methods for dirty check.

You’re right, it’s PersistenceTools that we are having a problem with. We are also using PersistenceHelper here so I got my wires crossed. I’ve updated the post to PersistenceTools instead of PersistenceHelper.

Hi,
by working with REST services do you mean using middleware services that have an argument of entity type? If so, then it is expected behavior. An entity, that is used in the service method, is just deserialized from the JSON and no database state synchronization is performed. If you need it, you have to reload entity explicitly in your service method.