Re: ec.saveChages gives null exception (didn't before)
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