Re: Casting one Custom EO Class into Another...
Re: Casting one Custom EO Class into Another...
- Subject: Re: Casting one Custom EO Class into Another...
- From: Chuck Hill <email@hidden>
- Date: Wed, 22 Dec 2004 17:24:57 -0800
You can't. They are different classes. You can't just cast them. It
is not legal (or sensible) in either Java or EOF. The word you are
looking for is copy. You want to copy the data from one to another.
You can do it manually, as someone else posted, or your can modify the
copying code in Practical WebObjects. For this one off, i'd just do it
manually.
Chuck
On Dec 22, 2004, at 1:53 PM, Clint Fleetwood wrote:
I need to cast say InventoryMaster class (a custom EO class from the
eomodel, table called InventoryMaster) into another class called
eCommerceBucket (another custom EO class from the eomodel) in order to
save the data from InventoryMaster to eCommerceBucket...The two tables
contain the EXACT SAME database structure (same attributes and fields
and everything), the eCommerceBucket is a temporary store to hold some
temporary data before passing it off to another company to be used for
an online website. I am putting the results from a fetchSpec called
against InventoryMaster into an NSMutableArray and I need to put that
data into eCommerceBucket but it complains that it can't because the
datatype is of type InventoryMaster and NOT eCommerceBucket.
Can Somebody please help....VERY DESPERATE.....THANKS A MILLION !!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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