Re: ERXMutableArray fields in Entity Modeler
Re: ERXMutableArray fields in Entity Modeler
- Subject: Re: ERXMutableArray fields in Entity Modeler
- From: Chuck Hill <email@hidden>
- Date: Thu, 17 Apr 2008 14:58:21 -0700
On Apr 17, 2008, at 2:42 PM, Mike Schrag wrote:
Thanks for your response, and yes, I think you understand. I was
hoping to not have to create a new table with just a boolean
column along with a relationship and that I could somehow just
store an array in one of the attribute fields directly for the same
effect. I assumed that's what ERXMutableArray class was for. If
not that, then what is it usually used for?
I think it IS designed for that actually ... I would need to see the
full stack trace of that exception to be able to diagnose further
why you're getting a ClassCast, though. I believe you also have to
replace the entire array when it changes (meaning
setArrayOfBooleans(arrayOfChangedBooleans)) -- I don't think EOF
likes mutable values,
It really does not.
but maybe there's some trickery inside of Wonder specifically for
ERXMutableArray, I'm not sure. I've never used this class
though ... Maybe Anjo knows, but his weekend apparently starts on
Thursday (something about Americans being #1, and Germans not ... I
don't recall precisely ;) ).
Europeans, always so willing to trade not being #1 for having an
actual life! They should learn to emulate Canadians. We are not #1
and we don't have lives either.
I recall badgering Anjo about use of mutable attributes once. I think
the eventually conceded that you did need to replace the array when it
changed. The comments say
an
* be used as a EOF custom value class because it can automatically
en- and
* decode an NSMutableArray as blob into a database.
So it can be used as an attribute without needing other cover methods
in your EO (e.g. serializing plists to and from a String attribute),
but is it not as trivial to use it as Jeff seems to be planning.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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