enonic/wem-ce — pull request #59 by vfi (2012-10-12 08:42:31+00:00)
Title: CMS-406 Creating or updating a user fails when it has multiple addresses...

... in the profile

There is a javax.jcr.ItemExistsException thrown when trying to save a user that has more than one address defined in his profile. This was detected in the import task, but it should fail as well when updating or creating from the admin console.

The problem seems to be that the JCR repository does not allow same-name siblings. We should probably avoid using children with the same name anyway. So instead of using address as the node name for each address node, use the address + index as the node name.

Now the structure is:

user
profile
addresses
address
address

It should be:

user
profile
addresses
address1
address2