Whoops. Sorry. Too many errors to keep straight. Ahhg.

The error I get when trying to grab the related (to-one) LotCode object is "The object with globalID _EOIntegralKeyGlobalID[LotCode (java.lang.Long)143937] could not be found in the database." (see below for full error)

The 143937 is the correct PK for the related record in the dbo.Lot_Code table, but it is in a different Database than the 45 ExternalLotCodes that it first found. They will all be related to that one LotCode in this situation.

Dave


ec 02 08:24:34 BakeryManagementJavaClient[60404] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - === Begin Internal Transaction Dec 02 08:24:34 BakeryManagementJavaClient[60404] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "SELECT t0.External_Lot_Code_ID, t0.External_Lot_Code_Value, t0.External_Part_Number, t0.Lot_Code_ID FROM dbo.MSDynamics_Lot_Code t0 WHERE UPPER(t0.External_Lot_Code_Value) LIKE UPPER(?) ESCAPE '\'" withBindings: 1:"8P31808269%"(externalLotCodeValue)> Dec 02 08:24:37 BakeryManagementJavaClient[60404] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - 45 row(s) processed Dec 02 08:24:37 BakeryManagementJavaClient[60404] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - === Commit Internal Transaction Dec 02 08:24:37 BakeryManagementJavaClient[60404] (ERXDatabaseContextDelegate.java:153) INFO er.transaction.adaptor.Exceptions - Database Exception occured: java.lang.IllegalStateException: The object with globalID _EOIntegralKeyGlobalID[LotCode (java.lang.Long)143937] could not be found in the database. This could be result of a referential integrity problem with the database. An empty fault could not be created because the object's class could not be determined (e.g. the GID is temporary or it is for an abstract entity). Dec 02 08:24:37 BakeryManagementJavaClient[60404] (ERXEntityDependencyOrderingDelegate.java:69) ERROR com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate - Unexpected non-EOGeneralAdaptorException exception java.lang.IllegalStateException: The object with globalID _EOIntegralKeyGlobalID[LotCode (java.lang.Long)143937] could not be found in the database. This could be result of a referential integrity problem with the database. An empty fault could not be created because the object's class could not be determined (e.g. the GID is temporary or it is for an abstract entity). at com .webobjects .eoaccess.EODatabaseContext._fetchSingleObject(EODatabaseContext.java: 3583) at com .webobjects .eoaccess .EODatabaseContext ._objectFaultWithSnapshotRelationshipEditingContext (EODatabaseContext.java:2532) at com .webobjects .eoaccess .EODatabaseContext .initializeObjectRowEntityEditingContext(EODatabaseContext.java:2433) at com .webobjects .eoaccess.EODatabaseContext.initializeObject(EODatabaseContext.java: 3734) at com .webobjects .eocontrol .EOObjectStoreCoordinator .initializeObject(EOObjectStoreCoordinator.java:646) at com .webobjects .eocontrol.EOEditingContext.initializeObject(EOEditingContext.java:3805)
        at er.extensions.eof.ERXEC.initializeObject(ERXEC.java:1047)
at com.webobjects.eoaccess.EODatabaseChannel $ _EODatabaseChannelFetchResult.initializeObjects(EODatabaseChannel.java: 478) at com .webobjects .eoaccess .EODatabaseContext ._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java: 3240) at com .webobjects .eoaccess .EODatabaseContext .objectsWithFetchSpecification(EODatabaseContext.java:3346) at com .webobjects .eocontrol .EOObjectStoreCoordinator .objectsWithFetchSpecification(EOObjectStoreCoordinator.java:539) at com .webobjects .eocontrol .EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java: 4114) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java: 1109) at com .webobjects .eocontrol .EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java: 4500) at com.webobjects.eodistribution.EODistributionContext $ _RemoteMethodReceiver .clientSideRequestObjectsForFetchSpecification (EODistributionContext.java:1103)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.webobjects.foundation.NSSelector.invoke(NSSelector.java:354)
at com .webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java: 108) at com .webobjects .eodistribution .common ._EOServerInvocation.doInvokeWithTarget(_EOServerInvocation.java:140) at com .webobjects .eodistribution .EODistributionContext ._processClientRequest(EODistributionContext.java:488) at com .webobjects .eodistribution .EODistributionContext .responseToClientMessage(EODistributionContext.java:577) at com .webobjects .eodistribution .WOJavaClientComponent.handleClientRequest(WOJavaClientComponent.java: 1105) at com .webobjects .eodistribution .WOJavaClientComponent.invokeAction(WOJavaClientComponent.java:343) at com .webobjects .appserver ._private.WOComponentReference.invokeAction(WOComponentReference.java: 104) at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:101) at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java:110) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 945)
        at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1168)
at com.webobjects.appserver.WOApplication.invokeAction(WOApplication.java: 1375) at er .extensions .appserver .ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:48) at er .extensions.appserver.ERXApplication.invokeAction(ERXApplication.java: 1529) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:196) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:287) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:322) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:358) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:432) at com .webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java: 1306) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1646) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1610) at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:173) at com .webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java: 254)
        at java.lang.Thread.run(Thread.java:613)



On Dec 2, 2008, at 7:21 AM, David Avendasora wrote:

Hmm. No, I'm not sure about that.

But, if I try to simply search for an ExternalLotCode it reads just fine, but then when I try to display the related LotCode,it does a SELECT statement where the FROM clause is trying to select records the dbo.Lot_Code table as though it were in the same DB as the dbo.External_Lot_Code table.

Shouldn't EOF recognize that the tables are in two different databases and not try to do one select statement that "joins" them?

Dave


On Dec 2, 2008, at 7:00 AM, Travis Britt wrote:

Are you sure you've done qualifiers that cross DBs and had it work?

tb

On Dec 2, 2008, at 5:20 AM, David Avendasora wrote:
I have am having a problem with a cross-model relationship. Here's the relationship

LotCode <->> ExternalLotCode

LotCode is in one EOModel and ExternalLotCode is in another. The EOModels are for two different databases, which may or may not be running on the same DB server. I've tested it both ways and have the same problems.

When I search for ExternalLotCodes by specifying values for attributes that exist on LotCode, I get an Invalid object name 'dbo.Lot_Code' error, which is the right table name, but it is looking in the wrong DB for it. The FROM clause of the SQL sent to the DB (ROM dbo.MSDynamics_Lot_Code t0, dbo.Lot_Code T1 ) shows that it is trying to create a join between tables in different DBs which is not going to work.

I've done other cross-db relationships that have worked. Why isn't this one? Any guesses?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to [EMAIL PROTECTED]




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to