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 <[EMAIL PROTECTED]> wrote:

yes, there is:

        // adjust mixins
        QName[] mixinNames = freeze.getFrozenMixinTypes();
        setMixinTypesProperty(new HashSet(Arrays.asList(mixinNames)));

regards, toby

On 3/27/07, HarveyWaters <[EMAIL PROTECTED]> 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.
>
>


--
-----------------------------------------< [EMAIL PROTECTED] >---
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 >---

Reply via email to