• 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: ec.saveChages gives null exception (didn't before)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ec.saveChages gives null exception (didn't before)


  • Subject: Re: ec.saveChages gives null exception (didn't before)
  • From: Art Isbell <email@hidden>
  • Date: Tue, 8 Mar 2005 11:45:22 -1000

On Mar 8, 2005, at 1:52 AM, Drew Thoeni wrote:

I've traced the SQL and have a related question. Just prior to EOF asking the database for the primary key (to prepare for an insert) EOF does a call to the database selecting *every* record in the table about to be updated. This is trivial for a test database, but in production, if you had, say, 100,000 records, it seems like this is unneeded and burdensome behavior from EOF.

Why does EOF do this and should it be stopped?

EOF can do this if both sides of an inverse relationship are class properties. In general, I try to decide which relationship I will reference in my Java code. Then I will remove its inverse from the list of class properties (but not from the eomodel itself).


In the case of a many-to-many relationship with the join entity exposed, there will be 2 sets of relationships from which you may need to remove one of the pairs from the list of class properties.

But first, get the many-to-many relationship working properly and then fine-tune your eomodel to minimize unnecessary fetching.

Aloha,
Art

_______________________________________________
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


References: 
 >ec.saveChages gives null exception (didn't before) (From: Drew Thoeni <email@hidden>)
 >Re: ec.saveChages gives null exception (didn't before) (From: Chuck Hill <email@hidden>)
 >Re: ec.saveChages gives null exception (didn't before) (From: Drew Thoeni <email@hidden>)
 >Re: ec.saveChages gives null exception (didn't before) (From: Chuck Hill <email@hidden>)
 >Re: ec.saveChages gives null exception (didn't before) (From: Drew Thoeni <email@hidden>)

  • Prev by Date: Re: Session.java:211: cannot resolve symbol symbol : method pageWithName (java.lang.String)
  • Next by Date: Re: Session.java:211: cannot resolve symbol symbol : method pageWithName (java.lang.String)
  • Previous by thread: Re: ec.saveChages gives null exception (didn't before) SOLVED
  • Next by thread: RE: ec.saveChages gives null exception (didn't before)
  • Index(es):
    • Date
    • Thread