Inheriting from EO Generated Classes
Inheriting from EO Generated Classes
- Subject: Inheriting from EO Generated Classes
- From: Colin Shreffler <email@hidden>
- Date: Mon, 08 Aug 2005 23:28:36 -0600
Title: Inheriting from EO Generated Classes
I’m trying create derived (child) classes for each of my EO generated classes.
For instance, I have an EOCustomer object that contains the java code generated by EOModeler. I have a class that extends this class called Customer. This way I can add custom code to my Customer class and generate the EOCustomer class whenever my model changes without having to merge my custom code each time.
The problem I’m having is that when I try to use my Customer class in a fetch and display the return results in a WORepetition, the framework throws an error. It tries to pass the base class type (EOCustomer) rather than the derived type (Customer). The error is below. Is anyone else doing this successfully? Is there a work around?
Thanks,
Colin
Error: java.lang.IllegalArgumentException: While trying to invoke the set method "public void CustomerSearch.setACustomer(Customer)" on an object of type CustomerSearch we received an argument of type EOCustomer. This often happens if you forget to use a formatter.
Reason: While trying to invoke the set method "public void CustomerSearch.setACustomer(Customer)" on an object of type CustomerSearch we received an argument of type EOCustomer. This often happens if you forget to use a formatter.
_______________________________________________
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