• 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
Error with Cross-Model Relationship
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error with Cross-Model Relationship


  • Subject: Error with Cross-Model Relationship
  • From: David Avendasora <email@hidden>
  • Date: Tue, 2 Dec 2008 05:20:29 -0500

Hi all,

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?

Dave

[1]
Dec 02 05:08:22 BakeryManagementJavaClient[59421] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  -  === Begin Internal Transaction
Dec 02 05:08:22 BakeryManagementJavaClient[59421] (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, dbo.Lot_Code T1 WHERE (UPPER(T1.Lot_Code_Value) LIKE UPPER(?) ESCAPE '\' AND UPPER(T1.Part_Number) LIKE UPPER(?) ESCAPE '\') AND t0.Lot_Code_ID = T1.Lot_Code_ID" withBindings: 1:"08269%"(lotCodeValue), 2:"03010119140181%"(partNumber)>
Dec 02 05:08:22 BakeryManagementJavaClient[59421] (ERXNSLogLog4jBridge.java:46) DEBUG NSLog  -  === Rollback Internal Transaction
Dec 02 05:08:22 BakeryManagementJavaClient[59421] (ERXDatabaseContextDelegate.java:153) INFO  er.transaction.adaptor.Exceptions  - Database Exception occured: com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <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, dbo.Lot_Code T1 WHERE (UPPER(T1.Lot_Code_Value) LIKE UPPER(?) ESCAPE '\' AND UPPER(T1.Part_Number) LIKE UPPER(?) ESCAPE '\') AND t0.Lot_Code_ID = T1.Lot_Code_ID" withBindings: 1:"08269%"(lotCodeValue), 2:"03010119140181%"(partNumber)>:
    Next exception:SQL State:S0002 -- error code: 208 -- msg: Invalid object name 'dbo.Lot_Code'.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Error with Cross-Model Relationship
      • From: Travis Britt <email@hidden>
  • Prev by Date: Instance ID wrong?
  • Next by Date: Embedding D2W components in non-D2W applications
  • Previous by thread: Re: Instance ID wrong?
  • Next by thread: Re: Error with Cross-Model Relationship
  • Index(es):
    • Date
    • Thread