jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: MicroKernel add/set property
Date Wed, 17 Oct 2012 15:58:05 GMT
On Wed, Oct 17, 2012 at 5:03 PM, Michael Dürig <mduerig@apache.org> wrote:
>
>
> On 17.10.12 15:49, Stefan Guggisberg wrote:
>>
>> i agree that the ambiguity of '^' vs '+' is confusing. personally i'd
>> prefer
>> to get rid of the '+' syntax for property creation altogether. as a
>> consequence we'd loose the ability to generate PROPERTY_ADDED events
>> from the mk journal. i don't know whether that's a problem for the
>> current oak-core implementation.
>
>
> MicroKernel.getJournal() is currently only used in an "old" indexing
> implementation in oak-core. Tom or Alex should be able to provide more
> information on how crucial it is to be able to differentiate  between ^ and
> + there or whether that implementation will go away completely eventually.
> Otherwise getJournal() is not used at all. So from my POV it makes sense to
> remove the '+' syntax since it tends to confuse people.

excellent, thanks.

>
> From another angle, since the ^ and + were introduced to be able to
> differentiate between a setProperty and an addProperty event for JCR
> observation, couldn't we make the same information also available by
> providing additional context in the journal (i.e. the previous value of the
> property or null if none)?

IIUC that would require an alternative json diff syntax which can't be used
for the commit method. i don't think that's worth it.

cheers
stefan

>
> Michael

Mime
View raw message