title: With a model that inherits from another in alfresco do they need to have distinct namespaces or can they share the same namespace?
body: <p>So I have 2 models. I have a "medicalBillModel" that I would like to inherit from "clientDocument". For some reason when I do this I get errors basically saying that the namespace has already being defined. When I have a model that inherits from another in alfresco do they need to have distinct namespaces or can they share the same namespace?</p>
  
  <p>I also tried to import the namespace and remove the namespace declaration but that causes this error:</p>
  
  <pre><code>Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: 06210000 Cannot define class ag:medicalBill as namespace http://www.company.com/model/content/1.0 is not defined by model ag:medicalBill
  </code></pre>
  
  <p>I am currently in the process of googling but not finding an example of one custom model that inherits from another.</p>
  
  <p>clientDocumentModel.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!-- Definition of new Model --&gt;
  
  &lt;model name="ag:clientDocument" xmlns="http://www.alfresco.org/model/dictionary/1.0"&gt;
  
     &lt;!-- Optional meta-data about the model --&gt;  
  
     &lt;description&gt;General Client Document&lt;/description&gt;
     &lt;author&gt;James Pearson&lt;/author&gt;
     &lt;version&gt;1.0&lt;/version&gt;
  
     &lt;imports&gt;
        &lt;import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/&gt;
        &lt;import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/&gt;
     &lt;/imports&gt;
  
     &lt;namespaces&gt;
        &lt;namespace uri="http://www.company.com/model/content/1.0" prefix="ag"/&gt;
     &lt;/namespaces&gt;
  
     &lt;types&gt;
  
        &lt;type name="ag:clientDocument"&gt;
           &lt;title&gt;General Client Document&lt;/title&gt;
           &lt;parent&gt;cm:content&lt;/parent&gt;
           &lt;properties&gt;
              &lt;property name="ag:clientName"&gt;
                 &lt;title&gt;Client&lt;/title&gt;
                  &lt;type&gt;d:text&lt;/type&gt;
              &lt;/property&gt;
           &lt;/properties&gt;
        &lt;/type&gt;
  
      &lt;/types&gt;
  
  &lt;/model&gt;
  </code></pre>
  
  <p>medicalBillModel.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;model name="ag:medicalBill" xmlns="http://www.alfresco.org/model/dictionary/1.0"&gt;
  
     &lt;description&gt;Medical Bill&lt;/description&gt;
     &lt;author&gt;James Pearson&lt;/author&gt;
     &lt;version&gt;1.0&lt;/version&gt;
  
     &lt;imports&gt;
        &lt;import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/&gt;
        &lt;import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/&gt;
        &lt;import uri="http://www.company.com/model/content/1.0" prefix="ag"/&gt;
     &lt;/imports&gt;
  
  
     &lt;types&gt;
  
        &lt;!-- Definition of new Content Type: Standard Operating Procedure --&gt;
        &lt;type name="ag:medicalBill"&gt;
           &lt;title&gt;Medical Bill&lt;/title&gt;
           &lt;parent&gt;ag:clientDocument&lt;/parent&gt;
           &lt;properties&gt;
  
              &lt;property name="ag:patientNameFirst"&gt;
                 &lt;title&gt;Patient First Name&lt;/title&gt;
                      &lt;type&gt;d:text&lt;/type&gt;
              &lt;/property&gt;
  
              &lt;property name="ag:patientNameLast"&gt;
                 &lt;title&gt;Patient Last Name&lt;/title&gt;
                      &lt;type&gt;d:text&lt;/type&gt;
              &lt;/property&gt;
  
              &lt;property name="ag:patientMiddleInitial"&gt;
                 &lt;title&gt;Patient Middle Initial&lt;/title&gt;
                      &lt;type&gt;d:text&lt;/type&gt;
              &lt;/property&gt;
  
              &lt;property name="ag:totalBillCharges"&gt;
                      &lt;title&gt;Total Bill Charges&lt;/title&gt;
                 &lt;type&gt;d:double&lt;/type&gt;
              &lt;/property&gt;
  
                  &lt;property name="ag:dateAdmitted"&gt;
                      &lt;title&gt;Facility Name&lt;/title&gt;
                 &lt;type&gt;d:date&lt;/type&gt;
              &lt;/property&gt;
  
                  &lt;property name="ag:dateDischarged"&gt;
                      &lt;title&gt;Facility Name&lt;/title&gt;
                 &lt;type&gt;d:date&lt;/type&gt;
              &lt;/property&gt;
  
              &lt;property name="ag:facility"&gt;
                      &lt;title&gt;Facility Name&lt;/title&gt;
                 &lt;type&gt;d:text&lt;/type&gt;
              &lt;/property&gt;
  
           &lt;/properties&gt;
        &lt;/type&gt;
  
      &lt;/types&gt;
  
      &lt;aspects&gt;
  
     &lt;/aspects&gt;
  
  &lt;/model&gt;
  </code></pre>