Re: Setting an attribute based on PK?
Re: Setting an attribute based on PK?
- Subject: Re: Setting an attribute based on PK?
- From: "Glenn L. Austin" <email@hidden>
- Date: Sun, 25 Apr 2004 08:07:35 -0700
on 4/25/04 1:16 AM, Ashley Aitken at email@hidden wrote:
> I want to set an attribute (not the primary key) based on the
> primaryKey value. But, of course, the primary key is not generated
> until during the initial saveChanges.
I had to do that on a project recently. I needed the PK value to generate a
separate user-visible reference number, so I ended up filling in what I
needed in the initial setup of that field. Later, after the object was
saved, I looked at that reference number and if it was of the "temporary"
format I refaulted the object and was able to read the PK, set the
reference number based upon that, and then save the object again.
--
Glenn L. Austin <><
Computer Wizard and Race Car Driver
<email@hidden>
<http://www.austin-home.com/glenn/>
_______________________________________________
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.