[ 
https://jira.nuxeo.com/browse/NXP-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Florent Guillaume updated NXP-3420:
-----------------------------------

    Description: 
If I want to use a different schema for user directory I can create the schema, 
and  contribute to the userDirectory. This contribution would work:

{code:xml}
 <extension target="org.nuxeo.ecm.core.schema.TypeService"
    point="schema">
    <schema name="user_bar" src="config/user_bar.xsd"/>
  </extension>
{code}

This one would fail:

{code:xml}
 <extension target="org.nuxeo.ecm.core.schema.TypeService"
    point="schema">
    <schema name="user_bar" src="config/user_bar.xsd" prefix="ub"/>
  </extension>
{code}

with this error:
{noformat}
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: 
org.nuxeo.ecm.directory.DirectoryException. message: Directory 'userDirectory' 
id field 'username' is not present in schema 'user_bar'
        at 
org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:148)
        at 
org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:50)
        ... 25 more
{noformat}
Even if the  username is defined in the schema. Using "ub:schema" moves the 
problem somewhere else.

  was:
If I want to use a different schema for user directory I can create the schema, 
and  contribute to the userDirectory. This contribution would work:

 <extension target="org.nuxeo.ecm.core.schema.TypeService"
    point="schema">
    <schema name="user_bar" src="config/user_bar.xsd"/>
  </extension>

This one would fail:

 <extension target="org.nuxeo.ecm.core.schema.TypeService"
    point="schema">
    <schema name="user_bar" src="config/user_bar.xsd" prefix="ub"/>
  </extension>

with this error:
Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: 
org.nuxeo.ecm.directory.DirectoryException. message: Directory 'userDirectory' 
id field 'username' is not present in schema 'user_bar'
        at 
org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:148)
        at 
org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:50)
        ... 25 more
Even if the  username is defined in the schema. Using "ub:schema" moves the 
problem somewhere else.


> Directories can't use a schema that has a prefix
> ------------------------------------------------
>
>                 Key: NXP-3420
>                 URL: https://jira.nuxeo.com/browse/NXP-3420
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>          Components: Directory
>    Affects Versions: 5.1.3, 5.2 M1
>            Reporter: Alexandre Russel
>            Assignee: Florent Guillaume
>            Priority: Major
>             Fix For: 5.4.x
>
>         Attachments: test.patch
>
>
> If I want to use a different schema for user directory I can create the 
> schema, and  contribute to the userDirectory. This contribution would work:
> {code:xml}
>  <extension target="org.nuxeo.ecm.core.schema.TypeService"
>     point="schema">
>     <schema name="user_bar" src="config/user_bar.xsd"/>
>   </extension>
> {code}
> This one would fail:
> {code:xml}
>  <extension target="org.nuxeo.ecm.core.schema.TypeService"
>     point="schema">
>     <schema name="user_bar" src="config/user_bar.xsd" prefix="ub"/>
>   </extension>
> {code}
> with this error:
> {noformat}
> Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: 
> org.nuxeo.ecm.directory.DirectoryException. message: Directory 
> 'userDirectory' id field 'username' is not present in schema 'user_bar'
>       at 
> org.nuxeo.ecm.directory.sql.SQLDirectory.<init>(SQLDirectory.java:148)
>       at 
> org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:50)
>       ... 25 more
> {noformat}
> Even if the  username is defined in the schema. Using "ub:schema" moves the 
> problem somewhere else.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to