• 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
EOF Inheritance problems help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOF Inheritance problems help


  • Subject: EOF Inheritance problems help
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 18 May 2007 16:21:28 +1000

Hi there,

first up, can inheritance cross model boundaries? i.e., if I have ModelA and ModelB both of which have different connection dictionaries (to different databases) can EntityB in ModelB inherit from EntityA in modelA?

If the answer is no then the below is irrelevant - but if yes, then I need some help with the below...

I have 3 models in my project (+ a Prototypes model of course):
- Willow: maps to database_1
- BinaryData: maps to database_2
- AnotherIrrelevantOne: maps to database_3

I have some abstract entities (defined in the Willow model)...
WillowEntity (Abstract no table mapping, has some common attributes)
|
__ ClientEntity (Abstract, mapped to ClientEntity table, adds an additional fk and relation to Client)
|
__ Client (concrete)
<...>


BinaryData model:
BinaryData (inherits from WillowEntity).

At application runtime I'm setting the relevant connection dictionaries for the various models (except the prototypes model).

Now the problem I'm seeing is that when I'm trying to save a Course for some reason EOF is attempting to find the next primary key for the table BinaryData(!) but in the Willow database!

Any ideas why that would happen? (See below)

with regards,
--

Lachlan Deck

2007-05-18 15:43:53,837 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - updateRecordsForEntity Course save ec...0
2007-05-18 15:43:53,837 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2007-05-18 15:43:53,837 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Label:Snapshot for Child Editing Context
2007-05-18 15:43:53,838 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - -----------------------------
2007-05-18 15:43:53,838 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Inserted objects:
2007-05-18 15:43:53,845 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - snapshot:{<....>; client = <java.lang.Class(cec78d) Fault _EOIntegralKeyGlobalID[Client (java.lang.Long)1]>; binaryInfoRelations = (); angelId = 215; entityType = "Course"; }
2007-05-18 15:43:53,846 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Updated objects:
2007-05-18 15:43:53,846 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2007-05-18 15:43:53,936 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2007-05-18 15:43:53,936 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Label:Snapshot for Parent Editing Context
2007-05-18 15:43:53,936 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - -----------------------------
2007-05-18 15:43:53,937 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Inserted objects:
2007-05-18 15:43:53,937 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - Updated objects:
2007-05-18 15:43:53,937 [WorkerThread3 ] DEBUG com.ish.willow.soap.webservices.controllers.SOAPController - <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[2007-05-18 15:43:53 EST] <WorkerThread3> === Begin Internal Transaction
[2007-05-18 15:43:53 EST] <WorkerThread3> finding primary key value for WillowEntity
[2007-05-18 15:43:53 EST] <WorkerThread3> evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT PK FROM EO_PK_TABLE WHERE NAME = 'WillowEntity' FOR UPDATE">
[2007-05-18 15:43:53 EST] <WorkerThread3> fetch canceled
[2007-05-18 15:43:53 EST] <WorkerThread3> 1 row(s) processed
[2007-05-18 15:43:53 EST] <WorkerThread3> finding maximum primary key value for WillowEntity
[2007-05-18 15:43:53 EST] <WorkerThread3> evaluateExpression: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT MAX (id) FROM BinaryData">
[2007-05-18 15:43:53 EST] <WorkerThread3> === Rollback Internal Transaction
[2007-05-18 15:43:54 EST] <WorkerThread3> unable to find maximum primary key value for WillowEntity
[2007-05-18 15:43:54 EST] <WorkerThread3> com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT MAX(id) FROM BinaryData">:
Next exception:SQL State:42S02 -- error code: 1146 -- msg: Table 'willow_client.BinaryData' doesn't exist
at com.webobjects.jdbcadaptor.JDBCContext._jdbcErrorWithChannel (JDBCContext.java:138)
at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression (JDBCChannel.java:310)
at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression (JDBCChannel.java:261)
at com.webobjects.jdbcadaptor.JDBCPlugIn.newPrimaryKeys (JDBCPlugIn.java:687)
at com.webobjects.jdbcadaptor.JDBCChannel.primaryKeysForNewRowsWithEntity (JDBCChannel.java:537)
at com.webobjects.eoaccess.EODatabaseContext._batchNewPrimaryKeysWithEntity (EODatabaseContext.java:5891)
at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator( EODatabaseContext.java:5874)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingCo ntext(EOObjectStoreCoordinator.java:409)
at com.webobjects.eocontrol.EOEditingContext.saveChanges (EOEditingContext.java:3165)
at com.ish.willow.soap.webservices.controllers.SOAPController.updateRecords ForEntity(SOAPController.java:320)
at au.com.ish.oncourseservices.v2.services.AngelReplicator.replicateRecords (AngelReplicator.java:73)
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:324)
at org.apache.axis.providers.java.RPCProvider.invokeMethod (RPCProvider.java:372)
at org.apache.axis.providers.java.RPCProvider.processMessage (RPCProvider.java:292)
at org.apache.axis.providers.java.JavaProvider.invoke (JavaProvider.java:276)
at org.apache.axis.strategies.InvocationStrategy.visit (InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.handlers.soap.SOAPService.invoke (SOAPService.java:437)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java: 316)
at com.webobjects.appserver._private.WOWebService.performActionNamed (WOWebService.java:364)
at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest( WOActionRequestHandler.java:240)
at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest (WOActionRequestHandler.java:142)
at com.webobjects.appserver._private.WOWebServiceRequestHandler.handleReque st(WOWebServiceRequestHandler.java:88)
at com.ish.willow.soap.appserver.ISHWebServiceRequestHandler.handleRequest( ISHWebServiceRequestHandler.java:87)
at com.webobjects.appserver.WOApplication.dispatchRequest (WOApplication.java:1306)
at com.ish.webobjects.appserver.ISHApplication.dispatchRequest (ISHApplication.java:912)
at com.ish.willow.soap.appserver.Application.dispatchRequest (Application.java:115)
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:534)



_______________________________________________ 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: EOF Inheritance problems help
      • From: Chuck Hill <email@hidden>
    • Re: EOF Inheritance problems help
      • From: Ken Anderson <email@hidden>
    • Re: EOF Inheritance problems help needed
      • From: Lachlan Deck <email@hidden>
  • Prev by Date: Fwd: Microsoft SQL support
  • Next by Date: RE: Microsoft SQL support
  • Previous by thread: Re: [Wonder-disc] [ANN] DMSelenium framework release
  • Next by thread: Re: EOF Inheritance problems help needed
  • Index(es):
    • Date
    • Thread