Re: Some help with Optimization
Re: Some help with Optimization
- Subject: Re: Some help with Optimization
- From: Art Isbell <email@hidden>
- Date: Thu, 9 Feb 2006 17:47:34 -1000
On Feb 9, 2006, at 4:32 PM, Chuck Hill wrote:
On Feb 9, 2006, at 4:11 PM, Art Isbell wrote:
EOModelGroup defaultGroup = EOModelGroup.defaultGroup();
EODatabaseContext databaseContext =
EODatabaseContext.registeredDatabaseContextForModel
(defaultGroup.modelNamed("ModelName"), ec);
=8-0 SHRIEK!
Indeed!
databaseContext.lock();
try {
databaseContext.batchFetchRelationship(defaultGroup.entityNamed
("External").relationshipNamed("activeName"), tempAllExs, ec);
selectableExtenals = (NSArray)tempAllExs.valueForKey("activeName");
}
finally {
databaseContext.unlock();
}
Yes, you need to. Really.
It's been so long since I accessed an EODatabaseContext directly
that I forgot about locking. Instead, I invoke my own
batchFetchRelationship() defined in the superclass of my Model
classes which is in a framework linked by various WO apps. My
implementation locks the database context before invoking
EODatabaseContext's batchFetchRelationship(). I apologize for
misleading anyone.
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