Hi,

I have a question about the "required" keyword.  The Advanced Tutorial says:

"As a complement to changeable you can use required for Attributes and
References that are to be included in the constructor, but still have a
setter method."

I find that when we set a Reference collection to required, it does not
appear in the constructor.  The collection reference is like:

- List<@Foo> foos required

It turns out that the code in helper.ext specifically excludes Reference
collections (see the last line):

List[NamedElement] getConstructorParameters(DomainObject domainObject) :
    domainObject.getSuperConstructorParameters().
        addAll(domainObject.attributes.select(a | (!a.changeable ||
a.required))).
        select(a | a != domainObject.getIdAttribute()).
        addAll(domainObject.references.select(r | !r.many && (!r.changeable
|| r.required)));

But Attribute collections that are "required" are included in the
constructor.  Since Reference collections are specifically being excluded,
there must be a very good reason, but I cannot figure out what that is.  Or
is this a bug??

Thanks,
Polly
-- 
View this message in context: 
http://www.nabble.com/-Sculptor--%22required%22-and-collection-references-tp24432505s17564p24432505.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to