On May 27, 2009, at 12:32 PM, Mike Schrag wrote:

Ok, but why does the generator creates the following:
public er.extensions.foundation.ERXMutableArray ordernummers() {
return (er.extensions.foundation.ERXMutableArray) storedValueForKey("ordernummers");
}

Is ordernummers an attribute or a to-many relationship? If it is a to-many relationship, this is normal. If this is an attribute, you have a problem. The generator just generates what you have modeled. If you model bad things, it will happily generate them.
having a mutable value isn't bad, though -- it's MUTATING that's bad, right? as long as he's doing a mutableClone of it every time he makes a change and calls setOrdernummers each time, it should be fine ... super tedious, but i would expect fine....


Yes. But I have never seen someone not start mutating it. :-) Possible, but not practical. :-P

Maybe the template should enforce that?

public void setOrdernummers(er.extensions.foundation.ERXMutableArray value) {

    takeStoredValueForKey(value.immutableClone(), "ordernummers");
  }



Chuck


--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to