Re: Letting the user enter the compound primary key in D2W
Re: Letting the user enter the compound primary key in D2W
- Subject: Re: Letting the user enter the compound primary key in D2W
- From: Chuck Hill <email@hidden>
- Date: Wed, 5 Apr 2006 16:31:55 -0700
On Apr 5, 2006, at 1:00 AM, John Gilmore-Baldwin wrote:
I’m trying to use Direct To Web on a legacy database system. I’m
not too familiar with D2W.
In this legacy database, there is a compound primary key, but the
user needs to be able to edit it.
That is pretty much flat out not possible. EOF won't save changes to
a primary key. You will get an exception when you call save
changes. Even if you could save the changes, it would mess up EOF's
object store as it does not expect the PK to change and bases the
EOGlobalID on it. Editable primary keys and EOF are mortal enemies.
I feel that way about editable primary keys myself. :-)
The only remotely possible way that I can see of to do this is to not
bind the UI to he EO values, use raw rows or raw SQL to update the
key values directly, and then calling invalidateAllObjects on the
root object store. Shudder.
Is there an easy way to get D2W to show the key? I made the key
fields class properties in EOModeler, but the fields still didn’t
show up.
That I don't know.
Chuck
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
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