jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "harvey waters" <harvey.wat...@googlemail.com>
Subject Re: Restore throws a ConstraintViolationException
Date Wed, 28 Mar 2007 08:06:51 GMT
Hi Tobias,

I've been running and re-running the code to try and understand this and I'm
sure this is a bug. setMixinTypesProperty does indeed alter the value of the
mixin type property but it doesn't change the mixinTypeNames in the state
variable (NodeState), this still has the original mixin names in it. When
the session.save is fired (at the end of the restore) the effective node
type uses  '((NodeState) state).getMixinTypeNames()' this builds an
effective node type that is now incorrect (as the restore has removed the
mandatory properties).

Thanks for the help.

Harvey

On 3/27/07, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
>
> yes, there is:
>
>         // adjust mixins
>         QName[] mixinNames = freeze.getFrozenMixinTypes();
>         setMixinTypesProperty(new HashSet(Arrays.asList(mixinNames)));
>
> regards, toby
>
> On 3/27/07, HarveyWaters <harvey.waters@googlemail.com> wrote:
> >
> > I can see in the restoreFrozen state function of NodeImpl that any
> properties
> > that are not in the node being restored are removed. There doesn't
> however
> > appear to be anything to remove mixinTypes that are no longer in the
> > restored node. Consequently a constraint violation is thrown for any
> mixin
> > types within mandatory properties. Is this right or am I missing
> something ?
> > --
> > View this message in context:
> http://www.nabble.com/Restore-throws-a-ConstraintViolationException-tf3472710.html#a9691232
> > Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
> >
> >
>
>
> --
> -----------------------------------------< tobias.bocanegra@day.com >---
> Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> T +41 61 226 98 98, F +41 61 226 98 97
> -----------------------------------------------< http://www.day.com >---
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message