You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Kaizer <Ka...@mastek.com> on 2007/09/29 10:57:41 UTC

Class definition changes - OCM

Hi,

I would like to know how OCM handles class definition changes. Suppose i
have already persisted some objects using OCM. If i add another attribute to
my class or change the data type of an existing attribute, will i be able to
retrieve existing objects?
Thanks.
-- 
View this message in context: http://www.nabble.com/Class-definition-changes---OCM-tf4538552.html#a12953467
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Class definition changes - OCM

Posted by Christophe Lombart <ch...@gmail.com>.
if you change type of an attribute, you could have some problem when you
will retrieve the node types created before this kind of change.

Best regards,
Christophe

On 9/29/07, Felix Meschberger <fm...@gmail.com> wrote:
>
> Hi,
>
> Class Definition changes by themselves don't matter to the OCM,
> especially if it only matters for adding properties. If you adapt the
> class mappgins correctly, you still may access the old properties while
> at the same time support the new attributes.
>
> Another point concerns the JCR node types storing the data: If you store
> the data in nt:unstructured nodes using a discriminator property, you
> will not have to change anything to the repository. Otherwise, you will
> be faced with adapting the node types to take care of the new attributes
> of the class. This is outside of the scope of OCM as node type
> management is currently not standardized in the JCR (it will be in the
> upcoming JSR-283 aka JCR 2 specification) and you will have to use
> internal Jackrabbit classes for this and only have limited API support
> to modify node types.
>
> Regards
> Felix
>
> Am Samstag, den 29.09.2007, 01:57 -0700 schrieb Kaizer:
> > Hi,
> >
> > I would like to know how OCM handles class definition changes. Suppose i
> > have already persisted some objects using OCM. If i add another
> attribute to
> > my class or change the data type of an existing attribute, will i be
> able to
> > retrieve existing objects?
> > Thanks.
>
>

Re: Class definition changes - OCM

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Class Definition changes by themselves don't matter to the OCM,
especially if it only matters for adding properties. If you adapt the
class mappgins correctly, you still may access the old properties while
at the same time support the new attributes.

Another point concerns the JCR node types storing the data: If you store
the data in nt:unstructured nodes using a discriminator property, you
will not have to change anything to the repository. Otherwise, you will
be faced with adapting the node types to take care of the new attributes
of the class. This is outside of the scope of OCM as node type
management is currently not standardized in the JCR (it will be in the
upcoming JSR-283 aka JCR 2 specification) and you will have to use
internal Jackrabbit classes for this and only have limited API support
to modify node types.

Regards
Felix

Am Samstag, den 29.09.2007, 01:57 -0700 schrieb Kaizer:
> Hi,
> 
> I would like to know how OCM handles class definition changes. Suppose i
> have already persisted some objects using OCM. If i add another attribute to
> my class or change the data type of an existing attribute, will i be able to
> retrieve existing objects?
> Thanks.