It is still a new and different EOEnterpriseObject class. You may no be adding data, but you are adding different behaviour.

Incidentally, if the new class is subset of the old class in terms of attributes, why not make the old class a subclass of the restricted class. Modeling your design effectively can make your life easy .... not doing so can make your life hard.

By the way, if it is just display of, or access to, attributes you want to hide, then this is a user/role/privileges problem whereby conditionals in your WOComponents that depend on the session user, the user's role and the user's privileges are used in the display of certain fields.



On Feb 7, 2006, at 2:09 PM, John Huss wrote:

Yeah, I'm just subclassing in code. I don't need to add any data, just override one method (hopefully).

John

----- Original Message ----- From: "Kieran Kelleher" <[EMAIL PROTECTED]>
To: "John Huss" <[EMAIL PROTECTED]>
Cc: "WebObjects-List Apple" <[email protected]>
Sent: Tuesday, February 07, 2006 12:27 PM
Subject: Re: Subclass EO class to conditionally return values


Are you literally subclassing in code and not making a subclass in the model? AFAIK, subclasses of EnterpriseObjects need to be defined in the eomodel and the parent EO class needs to be defined there. If that's what you have done, check your model.

See this:
http://developer.apple.com/documentation/WebObjects/UsingEOModeler/ 7ModelingInheritance/chapter_7_section_1.html



On Feb 7, 2006, at 11:43 AM, John Huss wrote:

I'd like to subclass one of my custom EO classes and change it to only conditionally return some of its values. I figured I could accomplish this by just overriding valueForKey. When I try to use the subclass I get this error:

java.lang.IllegalStateException: Unabled to find an EOClassDescription for objects of class RestrictedWeeklyInfo

How do I get around this? What's the best way to do something like this?

Thanks,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ kieran_lists%40mac.com

This email sent to [EMAIL PROTECTED]



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
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