AnsweredAssumed Answered

Order of model registration

Question asked by gautham.hegde on May 5, 2006
FYI
The order in which you register your models in example-model.xml is important because it may cause problems in importing one model from another. for example if you have two models examplemodel1 and examplemodel2, and you want to import examplemodel1 in examplemodel2 like so

examplemodel2.xml
<import uri="http://www.foo.com/model/example1/1.0" prefix="E1"/>
then in your example-model-context.xml the order should be

<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>              <value>alfresco/extension/exampleModel1.xml</value>
<value>alfresco/extension/exampleModel2.xml</value>
            </list>
        </property>
    </bean>
   
this seems obvious here, but my models were not named example1 and example2 :) and I didnt think they were being registered according to their order in the example-model.xml file.

Outcomes