Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODE-1525 Adding a node without specifying primary type incorrectly assumed "nt:unstructured" #428

Merged
merged 2 commits into from
Jun 26, 2012

Conversation

rhauch
Copy link
Contributor

@rhauch rhauch commented Jun 26, 2012

If a parent has a child node definition with a default primary node type, and a child (with the correct name to match the child node definition) is added without specifying the primary type, the child incorrectly was assigned a primary type of "nt:unstructured". This was because the "AbstractJcrNode.addNode(String)" method incorrectly hard-coded the node type to "nt:unstructured" rather than determining the child's node type from the parent's node type(s). Simply removing this assumption fixes the problem.

Two new tests were added to replicate this problem and verify the changes do correct the problem.

All unit and integration tests pass with these changes.

…ssumed "nt:unstructured"

If a parent has a child node definition with a default primary node type, and a child
(with the correct name to match the child node definition) is added without specifying
the primary type, the child incorrectly was assigned a primary type of "nt:unstructured".
This was because the "AbstractJcrNode.addNode(String)" method incorrectly hard-coded
the node type to "nt:unstructured" rather than determining the child's node type from
the parent's node type(s). Simply removing this assumption fixes the problem.

Two new tests were added to replicate this problem and verify the changes do correct the
problem.

All unit and integration tests pass with these changes.
@rhauch rhauch merged commit b22e271 into ModeShape:master Jun 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant