• 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: "Marc Desjardins" <email@hidden>
  • Date: Mon, 23 Feb 2004 22:15:48 -0500

Hi thanks for the reply.

	The fact that my tables were in two different databases was only one part
of the problem. I've now put them in the same DB and I still get the same
EOModeler error when I try and save it. When I run the application, I don't
get the sql error anymore, but when I try and create a new user, I get
another sql error that says I'm trying to insert a null value for the field
ID in the User table. I checked, nothing is inserted in the ExtendedUser
table as well.

-----Original Message-----
From: email@hidden
[mailto:email@hidden]On Behalf Of Art Isbell
Sent: February 23, 2004 5:13 PM
To: email@hidden
Subject: Re: Inheritance problem in EOModeler


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.
_______________________________________________
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.

References: 
 >Re: Inheritance problem in EOModeler (From: Art Isbell <email@hidden>)

  • Prev by Date: Re: Inheritance problem in EOModeler
  • Next by Date: WOFileUpload
  • Previous by thread: Re: Inheritance problem in EOModeler
  • Next by thread: Re[2]: Inheritance problem in EOModeler
  • Index(es):
    • Date
    • Thread