[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17556998#comment-17556998 ] Eric Norman commented on SLING-10740: - Merged PR #19 at: [{{a2eefbb}}|https://github.com/apache/sling-org-apache-sling-repoinit-parser/commit/a2eefbb3fc2b1b0e45faaf5e7f98cbc4c756b066] > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit Parser 1.6.16, Repoinit JCR 1.1.40 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17553340#comment-17553340 ] Eric Norman commented on SLING-10740: - PR #27 contains the proposed changes to the JCR repoinit implementation for review and feedback NOTE: These changes also require the changes from [apache/sling-org-apache-sling-repoinit-parser#19|https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/19] before it can be compiled and tested. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit Parser 1.6.16, Repoinit JCR 1.1.40 > > Time Spent: 0.5h > Remaining Estimate: 0h > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17553339#comment-17553339 ] Eric Norman commented on SLING-10740: - PR #19 contains the proposed changes to the parser for review and feedback > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit Parser 1.6.16, Repoinit JCR 1.1.40 > > Time Spent: 20m > Remaining Estimate: 0h > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17437874#comment-17437874 ] Angela Schreiber commented on SLING-10740: -- hi [~enorman], principal-based authorization must only rely on principal management API. the fact that users/groups are also a source of principals should be considered an implementation detail and neither oak authorization nor application code should expect any principal being backed by a user/group. what you perceive as an inconsistency in the user management between lookup by id vs principal is caused by the fact that lookup by id results in a UUID-query in the {{IdentifierManager}}. while the query itself would only be executed against persisted data, there exists special handling for transient UUIDs in oak, which does not exist for any other lookup. if you think the default principal lookup should also come with such a special behavior feel free to open an improvement request in the Oak project for components 'query' and 'security'. then we can discuss it with the teams involved what the impact would be and whether that makes sense or not. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428458#comment-17428458 ] Eric Norman commented on SLING-10740: - [~angela] Yes, I did notice that the implementation of UserPrincipalManager#getPrincipal was using a search query to lookup the principal by name and the search indexes are only updated after a save. I guess I was just wanting to take a quick look to see if PrincipalBasedAccessControlManager#canHandle could be implemented in a way that doesn't use the code path that requires a search query. For example, UserProvider#getAuthorizableByPrincipal uses a search query for the lookup but it looks like UserProvider#getAuthorizable does not do the same and may be able to find the unsaved transient principal to satisfy the PrincipalBasedAccessControlManager#canHandle checks without throwing an exception? But I could be wrong as I only took a quick glance at it. If you know of some reason why it would be impossible then I won't spend any more time on that. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428122#comment-17428122 ] Angela Schreiber commented on SLING-10740: -- [~bdelacretaz], i must have misread it. thanks for clarifying! > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428063#comment-17428063 ] Bertrand Delacretaz commented on SLING-10740: - bq. ...the proposal outlined by Bertrand Delacretaz, which would allow to set props for random paths looks a bit odd to me. It's not meant for setting props on random paths...the example above is a single path {{/var/discovery(nt:unstructured)/somefolder}} which is created and on which properties are set. I included nodetype parentheses in the example to make it clear that that syntax shouldn't change. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428053#comment-17428053 ] Angela Schreiber commented on SLING-10740: -- [~enorman], the reason why lookup for transient user principal may fail is the fact that JCR queries operate on the persisted data. there is not that much to be done about this and repo-init should IMHO not make any assumptions about the nature of the implementation of the JCR/Jackrabbit API apart from the public contract. IMHO option 2 would be the best but only allow properties for the created path(s) to be defined. the proposal outlined by [~bdelacretaz], which would allow to set props for random paths looks a bit odd to me. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427880#comment-17427880 ] Eric Norman commented on SLING-10740: - >From what I can tell, the jcr session save() api is called in two places while >processing the repoinit operations: # In AclVisitor#visitCreatePath after processing a "create path" statement # In AclVisitor#visitSetAclPrincipalBased during processing of a "set principal ACL" statement when lookup of a target principal fails. This seems to be a limitation of oak where it is not possible to create a principal and set a principal acl for that principal within the same transaction so this location does a save call to see if the principal is found after saving. Due to the second use case, removing the save() call from AclVisitor#visitCreatePath would not be sufficient for all use cases since any "set principal ACL" statement for any unsaved new user would also cause the save() call to fail with the same constraint exception since the AclVisitor#visitSetAclPrincipalBased is called before NodePropertiesVisitor#visitSetProperties I'll try to find some time to take a look at the oak code to see if there is some simple solution to the setting a principal acl on a "transient user" problem. If that can't be solved in oak and both "save()" calls can't be removed then I would agree that extending the "create path" grammar with properties is probably the best solution. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427843#comment-17427843 ] Bertrand Delacretaz commented on SLING-10740: - {quote}...we might need to review that and optimize to call save() only where really needed. {quote} In the meantime I ran [some experiments with large numbers of repoinit statements|https://gist.github.com/bdelacretaz/5ece181782206c0c9f820a78e6baaeef], and not calling save() at all might be problematic in such cases, in terms of performance. I _think_ if the Oak transient space gets too big that can be problematic - but I'm not sure. This speaks for the second option that you suggested, extending the {{create path}} syntax to allow for setting properties. As create path accepts a single path I think the following syntax will work for that: {code:java} create path (sling:Folder) /var/discovery(nt:unstructured)/somefolder with properties # same syntax as "set properties", and use the same code to set them # (maybe simply generate two Operations and make sure there's no save() in between?) set sling:ResourceType{String} to /x/y/z set cq:allowedTemplates to /d/e/f/*, m/n/* default someInteger{Long} to 42 end {code} That doesn't preclude removing any extraneous save() calls, but I think this solution is cleaner and also better in terms of keeping things together. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Assignee: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403008#comment-17403008 ] Bertrand Delacretaz commented on SLING-10740: - bq. perhaps calling save in AclVisitor#visitCreatePath is not necessary? I agree that removing that save might be the right path here. Before doing that, however, I would look at where save() calls happen generally in that module, we might need to review that and optimize to call save() only where really needed. > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17400673#comment-17400673 ] Eric Norman commented on SLING-10740: - Linking the changes for a test that demonstrates the problem > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory (and not autocreated). > No processing of "set properties" statements happens before the save() call > in AclVisitor#visitCreatePath so it does not seem to be possible to define > any mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, perhaps calling save in AclVisitor#visitCreatePath is not necessary? > I'm not sure of the historical reasons why save() is done there. > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (SLING-10740) Repoinit create path statement fails for node types with a mandatory property
[ https://issues.apache.org/jira/browse/SLING-10740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17400629#comment-17400629 ] Eric Norman commented on SLING-10740: - [~bdelacretaz] Do you have any thoughts on this or opinions on the preferred approach? > Repoinit create path statement fails for node types with a mandatory property > - > > Key: SLING-10740 > URL: https://issues.apache.org/jira/browse/SLING-10740 > Project: Sling > Issue Type: Bug > Components: Repoinit >Reporter: Eric Norman >Priority: Major > Fix For: Repoinit JCR 1.1.38 > > > The processing of the "create path" statement calls save() at the end which > will cause a constraint violation if the nodetype of the created path > contains any properties that are declared as mandatory. No processing of > "set properties" statements happens before the save() call in > AclVisitor#visitCreatePath so it does not seem to be possible to define any > mandatory properties using the current repoinit grammar. > I could see this solved in a couple ways: > # The AclVisitor#visitCreatePath could possibly pre-process any "set > properties" statements that are applicable to the created path before calling > save and then skip those same items when NodePropertiesVisitor visits the > same. > # Or, the "create path" grammar could be extended to allow defining > properties to be set at the same time as the create (with a syntax that is > similar to the "set properties" statement?) > # Or, maybe something else I haven't thought of > > -- This message was sent by Atlassian Jira (v8.3.4#803005)