This is strange. You mentioned elsewhere that you are using 1.1. Try
it with 1.2 (I would recommend the latest nightly build as it fixes
some bugs in this area [1]). Although the basic premise is the same -
'writeProperty' and 'setPersistenceState()' are called under both
releases.
Also you may try running your app in Eclipse debugger. You can run
(and debug) webapps in Eclipse with the JettyLauncher plugin [2].
Then you can step through your own and framework code to see what
really happens.
[1] http://objectstyle.org/downloads/cayenne/nightly/2006-5-9/
[2] http://jettylauncher.sourceforge.net/
Andrus
On May 5, 2006, at 3:09 PM, Eric Lazarus wrote:
> We never saw PersistenceState get set to MODIFIED.
> Confusing! Does that mean we messed up in the
> monitoring and should do the test again?
>
> All we saw was 3 (committed) and 5 (hollow)
>
> Should I put a break point in the datasource delegate
> or what will that not show me where I am making things
> dirty?
>
> Why we do NOT see these updates when we override
> writeProperty... and why we never see the valued
> MODIFIED when we override setPersistenceState().
>
> Something is not quite right. Hmmm....
>
> Eric
>
> --- Andrus Adamchik <andru..bjectstyle.org> wrote:
>
>>> Should I put a breakpoint in the data source
>> delegate or what?
>>
>> Sure. You can also override
>> CayenneDataObject.setPersistenceState(..)
>> and catch when the state changes to
>> PersistenceState.MODIFIED.
>>
>> Andrus
>>
>>
>> On May 5, 2006, at 2:22 PM, Eric Lazarus wrote:
>>> Andrus
>>>
>>> Objects are showing up in 'modifiedObjects'
>> without
>>> our seeing ANY update in 'writeProperty' so how
>> can we
>>> srceen for phantoms there. What else can cause
>> objects
>>> to show up as dirty when writeProperty is not
>> called
>>> for that object? Should I put a breakpoint in the
>> data
>>> source delegate or what?
>>>
>>> Eric
>>> --- Andrus Adamchik <andru..bjectstyle.org>
>> wrote:
>>>
>>>> Eric,
>>>>
>>>> I don't have time to go through all your code,
>> but
>>>> let me comment on
>>>> possible pitfalls.
>>>>
>>>> Sometimes frontend frameworks cause "phantom"
>>>> updates, when
>>>> populating objects from the form values. By
>> phantom
>>>> I mean the
>>>> equivalent of this: object.setX(object.getX()).
>> They
>>>> are cleared on
>>>> commit and should not generate events for the
>> peer
>>>> context, however
>>>> when you inspect an uncommitted DataContext, they
>>>> will show up in
>>>> "modifiedObjects" collection.
>>>>
>>>> We discussed various options to handle that, but
>>>> decided to put off
>>>> any solution till future releases [1]. Right now
>> you
>>>> can check for
>>>> "phantoms" and discard them inside
>> "writeProperty",
>>>> but this has its
>>>> own limitations as discussed in the Jira issue
>> that
>>>> I mentioned.
>>>>
>>>> Also there is a bug in the latest Beta, reported
>> by
>>>> Bryan [2]. This
>>>> may or may not be related.
>>>>
>>>> Andrus
>>>>
>>>> [1]
>> http://issues.apache.org/cayenne/browse/CAY-512
>>>> [2]
>>>>
>>>
>>
> http://objectstyle.org/cayenne/lists/cayenne-user/2006/04/0276.html
>>>>
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam
>> protection around
>>> http://mail.yahoo.com
>>>
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
This archive was generated by hypermail 2.0.0 : Tue May 09 2006 - 10:27:36 EDT