Hello,

I have tried to add a unique attribute to entity attributes, following the
instructions in the Developer manual.

The sculptor project compiles fine, but when I try to compile my project
(with a unique attribute somewhere), I get the following error: 

3172 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component
dslTransformation of type org.openarchitectureware.xtend.XtendComponent:
        EvaluationException : Couldn't find operation 'setUnique(Boolean)'
for sculptormetamodel::Attribute.
        transformation::DslTransformation.ext[7708,27] on line 183
'setUnique(attribute.unique)'
        transformation::DslTransformation.ext[4895,35] on line 116
'domainObject.attributes.transform()'
        transformation::DslTransformation.ext[1206,32] on line 33
'module.domainObjects.transform()'
        transformation::DslTransformation.ext[980,23] on line 27
'app.modules.transform()'
        nofile[0,19] on line 1 'transform(dslModel)'

What could it be? I have found no difference between unique and nullable in
the sculptor code. 

I have this in DslTransformation.ext: 

create sculptormetamodel::Attribute this transform(DslAttribute attribute) :
    ...
    setNullable(attribute.nullable) ->
    setUnique(attribute.unique) ->
    ...;

and in AttributeImpl.jva: 
public void setNullable(boolean newNullable){...}
public void setUnique(boolean newUnique) {...}

I have changed Hibernate.xpt as follows: 

«DEFINE property(String dbColumnPrefix, boolean isUnique) FOR Attribute»
  <property name="«name»" «
     ...«
      IF unique || isUnique» unique="true"«ENDIF» />
«ENDDEFINE»

(this was a bit confusing because unique is passed as a paremeter - I
changed it to isUnique hoping that I could then use my "unique" property)

In my model.design I have written

String name unique;
-- 
View this message in context: 
http://www.nabble.com/Problem-with-adding-transformation-feature-%28unique-attribute%29-tp17554873s17564p17554873.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to