• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Am I using EOUtilities.createAndInsertInstance() correctly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Am I using EOUtilities.createAndInsertInstance() correctly?


  • Subject: Re: Am I using EOUtilities.createAndInsertInstance() correctly?
  • From: Des Oates <email@hidden>
  • Date: Mon, 21 Mar 2005 18:27:32 +0000

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

Thanks to both who helped.

Des


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


_______________________________________________ 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
  • Follow-Ups:
    • Re: Am I using EOUtilities.createAndInsertInstance() correctly?
      • From: Chuck Hill <email@hidden>
References: 
 >Am I using EOUtilities.createAndInsertInstance() correctly? (From: Des Oates <email@hidden>)
 >Re: Am I using EOUtilities.createAndInsertInstance() correctly? (From: Christian Pekeler <email@hidden>)

  • Prev by Date: Re: Am I using EOUtilities.createAndInsertInstance() correctly?
  • Next by Date: Re: Deployment/JavaMonitor Question
  • Previous by thread: Re: Am I using EOUtilities.createAndInsertInstance() correctly?
  • Next by thread: Re: Am I using EOUtilities.createAndInsertInstance() correctly?
  • Index(es):
    • Date
    • Thread