You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Christian Sprecher <ch...@magnet.ch> on 2008/07/09 06:40:13 UTC
node type managment: current state and possible directions?
Hi all
I have read several posts regarding current and future directions
regarding node type management. I see that an issue has been created
(https://issues.apache.org/jira/browse/JCR-322), but the discussion
there seems to be stalled.
What I am currently wondering is: how *should* node type management work
in your opinion? E.g. looking at the following scenarios:
* a new node type is defined requiring a (not yet) defined node type (as
mandatory property, for example)
1: fails instantly
2: fails the first time a node of such a type is created
3: fails the first time such a node is persisted
(I would expect nr 3)
* a property is declared as being mandatory, but there are existing
nodes of this node type having no such property
1: fails instantly
2: assumes a default value for this property
3: fails the first time such a node is persisted (being either a new or
an updated one)
(hmm, no clue here :))
* a node type is removed, but is used in another node type definition
1: fails instantly
2: replaces all appearances of this node type with its parent up the
hierarchy (hmm, might be tough with multiple inheritance, but hey :))
* what does happen with older versions of nodes that become incompatible
with the new definition? Are node types versioned too?
I am sure that there are more scenarios, but currently I am more
interested in your general stance on this issue. Especially what is to
be considered part of JCR 2.0 standard and what will be
jackrabbit-specific.
Thx for your feedback
Re: node type managment: current state and possible directions?
Posted by Stefan Guggisberg <st...@day.com>.
hi christian
On Wed, Jul 9, 2008 at 6:40 AM, Christian Sprecher
<ch...@magnet.ch> wrote:
> Hi all
>
> I have read several posts regarding current and future directions
> regarding node type management. I see that an issue has been created
> (https://issues.apache.org/jira/browse/JCR-322), but the discussion
> there seems to be stalled.
>
> What I am currently wondering is: how *should* node type management work
> in your opinion? E.g. looking at the following scenarios:
> * a new node type is defined requiring a (not yet) defined node type (as
> mandatory property, for example)
> 1: fails instantly
> 2: fails the first time a node of such a type is created
> 3: fails the first time such a node is persisted
> (I would expect nr 3)
IMO node type registration should fail instantly,
similar to an RDBMS, where you can't create a
table with an unknown column type (AFAIK).
>
> * a property is declared as being mandatory, but there are existing
> nodes of this node type having no such property
> 1: fails instantly
> 2: assumes a default value for this property
> 3: fails the first time such a node is persisted (being either a new or
> an updated one)
> (hmm, no clue here :))
IMO 1.
>
> * a node type is removed, but is used in another node type definition
> 1: fails instantly
> 2: replaces all appearances of this node type with its parent up the
> hierarchy (hmm, might be tough with multiple inheritance, but hey :))
1.
>
> * what does happen with older versions of nodes that become incompatible
> with the new definition? Are node types versioned too?
node types are unfortuantely not versioned;
existing nodes which are incompatible with the current node type definition
should IMO be prevented.
cheers
stefan
>
>
> I am sure that there are more scenarios, but currently I am more
> interested in your general stance on this issue. Especially what is to
> be considered part of JCR 2.0 standard and what will be
> jackrabbit-specific.
>
> Thx for your feedback
>
>
>
>
>
>
>
>
>
>