jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xavier <xcou...@gmail.com>
Subject Re: OCM issues with path and id fields (annotations)
Date Wed, 13 Feb 2008 20:41:43 GMT

Hello Christophe,


Christophe Lombart wrote:
> 
> On Feb 13, 2008 6:26 PM, Xavier <xcoulon@gmail.com> wrote:
> 
>>
>> Hello,
>>
>> I'm beginning working with the Jackrabbit OCM extension and i'm stuck
>> with
>> the following issue on a very trivial example: in the 'Article' class, I
>> defined fields for the "content" of an article, plus fields for 'path'
>> and
>> 'uuid'. I set the mixins for referencing (hence, support for UUID). At
>> the
>> save time, I was expecting that the uuid field would be populated by the
>> persistenceManager, but nope. (even if using ID is not a good practice, I
>> like to know that my config works)
> 
> 
> With the current implementation,  the UUID id id not refreshed. it will
> refreshed when the object will be retrieve again (eg. with a getObject
> call).
> 

Is there a bug in JIRA to follow this change or is it already planned for a
the coming-up release ?


Christophe Lombart wrote:
> 
>>
>> Furthermore, when I save two distinct nodes with the same path (as
>> annotated
>> with the 'path' attribute of the Field annotation), i don't see the path
>> indexing, as i could have when using the standard JCR API
>> (session.save(node), etc...)
>>
> you are rigth, the path field is not updated in this case.
> 
>> My proto is based on spring 2.5 + springmodules 0.8 + Jackrabbit OCM 1.4,
>> and the 'glue' uses the patch submitted here :
>> http://jira.springframework.org/browse/MOD-446 The difference with the
>> tests
>> in the patch is that I use annotations instead of xml mapping
>>
>>
>> I'm used to ORM frameworks like Hibernate, so I was expecting that the
>> persistenceManager would behave the same way, ie. setting values such as
>> ID
>> or updating the path value if a node with the same path already exists.
>> Is
>> it the way it works with OCM too ?
>>
> 
> You are welcome to create new jira issues for that kind of problem.
> 
> I'm not sure that many people, here, are using UUID and SNS but we can try
> to find the more appropriate solution.
> 
> 
> Thanks,
> Christophe
> 
> 
The first purpose of my test was to understand the OCM framework. If the
good practice is to check that a node with the given path already exists and
then decide to insert or update it (almost like an ORM framework does, but
with OCM it is versionning), this is fine for me. As I read in the wiki, the
use of path instead of uuid to find nodes is recommanded, so i'll follow
this way...

I opened a bug in JIRA about the path update issue:
https://issues.apache.org/jira/browse/JCR-1381 


Regards,
Xavier




-- 
View this message in context: http://www.nabble.com/OCM-issues-with-path-and-id-fields-%28annotations%29-tp15460625p15467460.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message