• 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: Primary Key Maximum value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Primary Key Maximum value


  • Subject: Re: Primary Key Maximum value
  • From: Ray Kiddy <email@hidden>
  • Date: Tue, 20 Mar 2007 11:55:16 -0700


On Mar 20, 2007, at 11:17 AM, Miguel Arroz wrote:

Hi!

  I'm in the state of panic here...

I have modeled my DB using 8 byte primary key values. Apparently PostgreSQL takes this fine.

Today, I needed some code to obtain a primary key, and used the code at <http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/ Using_EOF/Primary_Keys>.

I started suspecting that it would not work, because it checks for an Integer, and the key should be a Long value. The problem is that... it worked!

What does this mean? WO only supports 4 byte primary keys? That's not good at all... please tell me I'm going crazy for no reason and there's something tremendously obvious that I have missed.

  Yours

Miguel Arroz


It is probably working because the cast of the pk is losing data, but the pk is still unique. But it also sounds as though you already know not to rely on this behavior.


I had not looked at the wikibook documentation you refer to. For what you are trying to do, you may want to look at the databaseContextNewPrimaryKey method in the EODatabaseContext.Delegate class.

- ray

_______________________________________________
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


  • Follow-Ups:
    • Re: Primary Key Maximum value
      • From: Miguel Arroz <email@hidden>
References: 
 >Primary Key Maximum value (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Please forward to your network....
  • Next by Date: Re: Delete cascade?
  • Previous by thread: Primary Key Maximum value
  • Next by thread: Re: Primary Key Maximum value
  • Index(es):
    • Date
    • Thread