Optimization - Share All Objects -> Register Database Context?
Optimization - Share All Objects -> Register Database Context?
- Subject: Optimization - Share All Objects -> Register Database Context?
- From: Ian Joyner <email@hidden>
- Date: Thu, 11 Aug 2005 12:37:48 +1000
I'm just starting to optimize this application. Enterprise Objects
seems to do many fetches on the DB. The first problem I have is that
I have a table with a lot of fixed values (sort of a key/value coding
table) for things like gender (male/female), title (Mr, Mrs...) and
other things, which are subclasses (single table inheritance) of a
single table entity.
I want to load this only once, so have set "Share all objects" in
EOModeler's Shared entity inspector for the parent class (I have also
tried all the subclasses as well). In the FetchAll spec, I have set
the "Perform deep inheritance fetch" option. This has caused all the
subclasses to be loaded on the server side, but as soon as they are
loaded, I get:
$OpenBaseExpression: "SELECT t0.PRIMARY_KEY, t0.TYPE, t0.VALUE FROM
ENUMERATION t0 WHERE t0.TYPE = ?" withBindings: 1:"M"(type)>
[2005-08-11 12:04:42 EST] <WorkerThread5> 3 row(s) processed
[2005-08-11 12:04:42 EST] <WorkerThread5> === Commit Internal
Transaction
[2005-08-11 12:04:42 EST] <WorkerThread5> Server exception:
registeredDatabaseContextForModel() Cannot register the database
context for the model X_Generic
[2005-08-11 12:04:42 EST] <WorkerThread5>
java.lang.IllegalStateException: registeredDatabaseContextForModel()
Cannot register the database context for the model X_Generic
at
com.webobjects.eoaccess.EODatabaseContext.registeredDatabaseContextForMo
del(EODatabaseContext.java:1145)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
If I set the "Share all objects" flag on the subclasses, I get the
same exception on the model containing the subclass.
This is a Java Client application.
Does anyone have any ideas why
EODatabaseContext.registeredDatabaseContextForModel is throwing an
exception? There is no indication in the EODatabaseContext
documentation as to why it might fail, let alone what needs to be
done to fix it.
Thanks
Ian Joyner
Sportstec
_______________________________________________
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