• 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
Re: Inheritance problem in EOModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inheritance problem in EOModeler


  • Subject: Re: Inheritance problem in EOModeler
  • From: Art Isbell <email@hidden>
  • Date: Mon, 23 Feb 2004 12:12:59 -1000

On Feb 23, 2004, at 10:58 AM, Marc Desjardins wrote:

The client framework contains a User table. In our
data framework, we are extending their user object to add more fields and
relationships with our items.

The ExtendedUser and the User table are in two different openbase database,
I'm not sure if this can create a problem.

When I try to run the application, I get the following error:
Error:
com.webobjects.jdbcadaptor.JDBCAdaptorException: EvaluateExpression failed:
: Next exception:SQL State:42000 -- error code: 0 -- msg: SQL ERROR -
[position 236, near 'WHERE' in ' USER T1 WHERE t0.ID'] (1) table 'USER' does
not exist. SQL: SELECT T1.FIRSTNAME, T1.LASTNAME, t0.USERNAME, t0.ID FROM
EXTENDED_USER t0, USER T1 WHERE t0.ID = T1.ID

Your problem is occurring because you are writing EOF code that results in SQL being generated that specifies a join of tables in different databases. OpenBase apparently does not support joins across databases.


You can probably accomplish what you are trying to do (i.e., isolate your extensions in a different table and database from your client's table and database). To do so, you must avoid writing any EOF code that results in cross-DB join SQL being generated (including flattened attributes and WO component bindings that are attribute paths involving the ExtendedUser.user relationship). This will require two separated fetches, one from each DB, instead of a single join fetch. In your example, you would need to first fetch the desired ExtenderUser object and then use the value of the ExtendedUser.user relationship to access properties of the related User object (possibly by merely referring to the User property which would fire a fault if the User object has not already been fetched).

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re[2]: Inheritance problem in EOModeler
      • From: Marcelo Ruiz Camauer <email@hidden>
    • RE: Inheritance problem in EOModeler
      • From: "Marc Desjardins" <email@hidden>
References: 
 >Inheritance problem in EOModeler (From: "Marc Desjardins" <email@hidden>)

  • Prev by Date: EOF and Tomcat Issue.
  • Next by Date: RE: Inheritance problem in EOModeler
  • Previous by thread: Inheritance problem in EOModeler
  • Next by thread: RE: Inheritance problem in EOModeler
  • Index(es):
    • Date
    • Thread