• 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: Setting an attribute based on PK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Setting an attribute based on PK? (From: Ashley Aitken <email@hidden>)

  • Prev by Date: Use of derived Attributes
  • Next by Date: Re: Setting an attribute based on PK?
  • Previous by thread: Re: Setting an attribute based on PK?
  • Next by thread: Re: Setting an attribute based on PK?
  • Index(es):
    • Date
    • Thread