• 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: Ashley Aitken <email@hidden>
  • Date: Sun, 25 Apr 2004 21:07:28 +0800

In these days and times, is the first sign of madness replying to your own posts?

On 25/04/2004, at 4:16 PM, Ashley Aitken 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.

Just saw some code on WODev (thanks to all who have created that wonderful resource) for generating primary keys on insert. I will try that and see how it goes.


Of course, the downside is that the primary keys may not get used (ie no saveChanges) and you lose any sequencing/counting on the primary key (but then it is supposed to be database-specific not app-specific).

If anyone can tell me why the method I originally tried (using the primary key after it was generated on a saveChanges) didn't work, or a better way to do what that, I would be most grateful.

Thanks to all those who have replied to my post ;-)

Cheers,
Ashley

--
Ashley Aitken
Perth, Western Australia
mrhatken at mac dot com
_______________________________________________
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.


  • Follow-Ups:
    • Re: Setting an attribute based on PK?
      • From: Anjo Krank <email@hidden>
References: 
 >Setting an attribute based on PK? (From: Ashley Aitken <email@hidden>)

  • Prev by Date: Pre Built Image Management Projects
  • Next by Date: Fwd: Pre Built Image Management Projects
  • Previous by thread: Setting an attribute based on PK?
  • Next by thread: Re: Setting an attribute based on PK?
  • Index(es):
    • Date
    • Thread