jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: javax.jcr.nodetype.ConstraintViolationException
Date Sat, 22 Apr 2006 22:11:00 GMT
Hi,

On 4/21/06, Alexandru Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> I had some content in the repository. Because of this some type
> definitions where already persisted and they lead to the content of
> the cache. When using the new definition, it has an intersection with
> an old one, and that's the reason the exception is thrown.

OK, thanks for investigating this. Currently there is little support
in Jackrabbit for removing or modifying existing node types (see
JCR-322), and the safest way to switch to new node types is to either
use separate node type names or to start with a fresh repository and
use system view exportt/import to migrate the existing content to the
new repository with updated node types.

> let's say we have an working repository with data. After a while, we
> identify that we need to enhance the date with some more properties
> (add a feature to the content). We decide to do this by adding a new
> mixin to the existing content nodes (because we are talking about a
> crosscutting feature, and because there is no other way). Is this
> scenario gonna work? Is this the correct approach? If not, how can we
> do it?

Yes, and yes. One of the main points of mixin node types is that you
can use them to annotate and further specify existing nodes. The JCR
API explicitly supports this through the methods Node.addMixin() and
Node.removeMixin().

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - info@yukatan.fi
Software craftsmanship, JCR consulting, and Java development
Mime
View raw message