On Apr 17, 2008, at 4:58 PM, Chuck Hill wrote:


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.

So, would the recommended method (i.e simplest method, you know us Americans, always looking to take shortcuts) be to create a new table and a one to many relationship? My array really doesn't need to be mutable (the size is static and known), it's just that that was the only "array" choice given me in Entity Modeler.



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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jeffandmonica%40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
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 [EMAIL PROTECTED]

Reply via email to