Re: Am I using EOUtilities.createAndInsertInstance() correctly?
Re: Am I using EOUtilities.createAndInsertInstance() correctly?
- Subject: Re: Am I using EOUtilities.createAndInsertInstance() correctly?
- From: Chuck Hill <email@hidden>
- Date: Mon, 21 Mar 2005 11:37:07 -0800
On Mar 21, 2005, at 10:27 AM, Des Oates wrote:
Doh!
That looks like that is what it was. It was a typo in the fully
qualified class name in the EO Model.
BTW this line came back with"com.webobjects.control.EOGenericRecord"
which presumably it defaults to if it can't find the class itself
Yes, that is what happens. It is not a very helpful default.
Chuck
On 21 Mar 2005, at 18:14, Christian Pekeler wrote:
I'm getting a class cast exception when I call this method like this:
MyObject mo = (MyObject) EOUtilities.createAndInsertInstance(myEC,
"MyObject");
Did you set the class for the MyObject entity to MyObject in your
EOModel?
If you did, check what you're actually getting
System.out.println(EOUtilities.createAndInsertInstance(myEC,
"MyObject").getClass().getName())
Christian
--
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