Ah, very clever.  This works for my needs.  :)

Thank you so much!

--Polly



Patrik Nordwall wrote:
> 
> I have a suggestion of how you can solve it in your customization. Maybe
> not perfect but...
> 
> In model.design you name the duplicate objects with a module prefix:
> 
>       Module moduleA {
>         ValueObject ModuleA_Foo {
>           not persistent
>         }
>       }
>       
>       Module moduleB {
>         ValueObject ModuleB_Foo {
>           not persistent
>         }
>       }
>       Module moduleC {
>         ValueObject Bar {
>           - @ModuleA_Foo foo
>         }
>       }
> 
> 
> In the transformation you can adjust the name if it starts with the module
> prefix
> 
> workflow.oaw:
>     <component adviceTarget="modelTransformation"
> class="oaw.xtend.XtendAdvice"> 
>         <extensionAdvice value="extensions::TransformationSpecialCases" /> 
>     </component>
> 
> TransformationSpecialCases.ext:
> import sculptormetamodel; 
> 
> around transformation::Transformation::modify(Application app) :
>     ctx.proceed() ->
>     app.modules.domainObjects.modifyName() ->
>     app;
>       
> modifyName(DomainObject domainObject) :
>     if
> (domainObject.name.toLowerCase().startsWith(domainObject.module.name.toLowerCase()
> + "_")) then
>       domainObject.setName(domainObject.name.split("_").get(1));
> 
> /Patrik
> 

-- 
View this message in context: 
http://www.nabble.com/-Sculptor--resolving-references-to-domain-objects-with-same-name-in-different-modules-tp19152982s17564p19167528.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to