• 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: Making a fake EO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a fake EO


  • Subject: Re: Making a fake EO
  • From: David Avendasora <email@hidden>
  • Date: Thu, 19 Feb 2009 10:36:14 -0500


On Feb 19, 2009, at 8:18 AM, Gennady Kushnir wrote:

Hello list!
I have rather complicated question: is it possible to make an
Enterprise Object that does not relate to any specific existing row in
database?
I want it to indicate vacant employee places where on the other hand I
don't want to store NULL.

Why don't you want to store null? Is this a situation where you don't have control over the DB? Is there a DBA that is trying to impose extreme normalization?


So I want relationships pointing to "zero" which is not real primary
key for any row in database to return that fake EO in my WOapp.

That is going to be very hard because EOF is automatically going to go to the Database to look up the instance that has a Primary Key of 0, and throw an error if it can't find it. It is possible with Wonder to have it just log the error and not terminate the application, but it is a scary hack if you are in control of the database.


And vice-versa - when I assign a relationship to fake EO - then a related
cell in database should get zero value (not null). And also I want to
be able to search database for that value using EOF.

While this may be possible, it fits squarely in the category of "The Hard Way™"


Is it possible somehow? Or my only way is to create a real record in
my employee database called "Mr. Vacancy"

Ahg! That's also a hack. What is wrong with null?

and maybe even pay him
salary :)

Please use Direct Deposit. I will forward Mr. Vacancy's account information off-list. :-)


Dave



Thanks in advance
Gennady
_______________________________________________
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



_______________________________________________ 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: Making a fake EO
      • From: Gennady Kushnir <email@hidden>
References: 
 >Making a fake EO (From: Gennady Kushnir <email@hidden>)

  • Prev by Date: Re: Making a fake EO
  • Next by Date: Re: Making a fake EO
  • Previous by thread: Re: Making a fake EO
  • Next by thread: Re: Making a fake EO
  • Index(es):
    • Date
    • Thread