You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by hsp <pi...@ibest.com.br> on 2013/02/05 17:34:05 UTC

Convert field type

Hi;
Is it possible in jackrabbit 2.x to convert property type from reference to
weakreference? What are the possible consequences?
Regards.
Helio.



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Convert-field-type-tp4657625.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Convert field type

Posted by hsp <pi...@ibest.com.br>.
Thanks Jukka,
My need is because repository's performance. The actual ambient is with jack
1.4, and with the effort to migrate I am investigating these other options.
Yes, they are custom node types with mandatory reference property, I think
will need to control this kind of properties in the application to not have
loss of integrity, (maybe observe to removes in nodes with
mix:referenceabe), and live without that Node.getReferences() method :-/.
In my model, the security policy uses a hierarchy bellow each node, that
make references to user's nodes and group's nodes,  beyond the references
existing in the content model.
I am also planning to migrate this security policy to the way it is
implemented in 2.x.

I would appreciate some hints to mitigate the riscs of this processes.

Sorry by my bad english,
Regards
Helio



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Convert-field-type-tp4657625p4657638.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: Convert field type

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Tue, Feb 5, 2013 at 5:34 PM, hsp <pi...@ibest.com.br> wrote:
> Is it possible in jackrabbit 2.x to convert property type from reference to
> weakreference?

Depends on whether you've declared it in a node type. If you have
something like an nt:unstructured node with a reference property
pointing somewhere, you can simply overwrite that property with a weak
reference to the same target. But if you have a custom node type that
mandates a property to be a hard reference, then changing that will be
somewhat difficult.

> What are the possible consequences?

The obvious one is the potential loss of referential integrity. The
target of a weak reference can be removed, leaving behind a dangling
reference.

The other impact is the Node.getReferences() method, that only works
with hard references.

BR,

Jukka Zitting