cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to declaratively specify that child names for a given parent must be unique (like a file system)?

ron_1
Star Contributor
Star Contributor

If not, this would be an useful feature to support in both the repository and the web ui.

In Studio, this feature might appear as a third checkbox entitled "Enforce Child Name Uniqueness" on the "Definition" tab of the "Document Type" screen.

You might also consider allowing a developer or Studio user to declaratively specify that modification timestamps on children should propagate to the parent. This might be a fourth Studio checkbox.

3 REPLIES 3

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Yes this is easy, and you can do that with Nuxeo Studio and Nuxeo IDE.

Here is the steps to that:

  • Create an Document Listener with Nuxeo IDE
  • bind your listener to events documentAboutToCreate and DocumentAboutToModify with your listener synchronously.
  • check into your listener that into the parent there is no child with same name
  • if there is a child with the same name throw an Exception

This is a first way, but quickly like that I have to look more precisely about which exception you have to send, and what about information to show into the UI (name already exists). I'm not sure this case will cover the move of documents.

But you can start to test that and tell me your trouble 😄

After perusing JIRA, I think I am looking for a more comprehensive solution like the one described in JIRA https

A nuxeo-unicity-folder marketplace add-on that defines a new document type, 'Unicity Folder', that prevents its children from having duplicate dc

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.