Fornax-Platform
Forum

 « Return to Thread: Hibernate - Always generate List?

Re: Hibernate - Always generate List?

by Darius Jockel :: Rate this Message:

Reply to Author | View in Thread

Please try this:

Inside your project put a 'MyAdvice.ext' into a m2t folder.
The file contain this code:
around org::fornax::cartridges::uml2::javabasic::m2t::DataType::isSet(*) :
        false;


The example workflow.oaw is extended by the two components like described in the last post. Now is looks like this:
<workflow>
        <property file="./workflow.properties"/>
       
        <component
                class="org.openarchitectureware.util.featureconfig.text.TextConfigurationReader">
                <configFile value="${feature.model}" />
        </component>
       
        <bean class="org.openarchitectureware.uml2.Setup"
                standardUML2Setup="true" />
       
        <component class="org.openarchitectureware.emf.XmiReader">
                <modelFile value="${model.file}"/>
                <outputSlot value="model"/>
        </component>
       
        <component adviceTarget="hibernateCartridge_pojo_generator" id="MyAdvices1" class="oaw.xpand2.GeneratorAdvice">
      <extensionAdvices value="m2t::MyAdvice"/>
        </component>

        <component adviceTarget="hibernateCartridge_mapping_generator" id="MyAdvice2" class="oaw.xpand2.GeneratorAdvice">
    <extensionAdvices value="m2t::MyAdvice"/>
        </component>

        <cartridge file="org/fornax/cartridges/uml2/hibernate/hibernate.oaw"
                inheritAll="true">
                <prExcludes value="*.svn-base"/>
        </cartridge>
               
</workflow>

You see, all the changes have to be done inside your project.
If you want I can provide this example.

By the way: Thank you very much for your question. I think I will extend the provided example project by such an aop example. This will be part of further releases.

Regards
Darius
 

 « Return to Thread: Hibernate - Always generate List?