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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to