Re: Prototype mutableArray savechanges error
Re: Prototype mutableArray savechanges error
- Subject: Re: Prototype mutableArray savechanges error
- From: Chuck Hill <email@hidden>
- Date: Wed, 27 May 2009 12:37:10 -0700
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden