• 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: JDBCAdaptor@b447de failed to provide new primary keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JDBCAdaptor@b447de failed to provide new primary keys


  • Subject: Re: JDBCAdaptor@b447de failed to provide new primary keys
  • From: Don Lindsay <email@hidden>
  • Date: Sat, 5 Jan 2008 17:27:56 -0500

Hello;

The primary key is based on a person identifier, serial number, and the date the item was assigned to a person. I could generate a primary key that is a sequential number but hen that breaks referential integrity with other tables.

Don
On Jan 5, 2008, at 5:20 PM, Miguel Arroz wrote:

Hi!

A date as a primary key? Hummmmm.... never tried that, but my "not good idea" buzzer is buzzing! :)

I suppose you could override something in the framework to generate your own PKs (I know this is described somewhere, maybe in the Apple Enterprise Objects guide), but I don't think it's legal to set it manually. You shouldn't even have the diamond turned on on that attribute.

Is there any serious reason to use date as a PK? Why can't you use a normal PK? If you want to be sure that you don't have to equal dates, just set a unique constraint on the database.

 Yours

Miguel Arroz

On 2008/01/05, at 22:16, Don Lindsay wrote:

Hello;

One of the primary keys is a date field, how would the system set this date?

don
On Jan 5, 2008, at 5:11 PM, Miguel Arroz wrote:

Hi!

On 2008/01/05, at 22:05, Don Lindsay wrote:

I am using an oracle database. Anytime I attempt to insert a record in any table I get the following error:

com.webobjects.jdbcadaptor.JDBCAdaptor@b447de failed to provide new primary keys for entity 'WeaponAssignment'

I have set all of the primary key attributes before attempting to insert the object. So I am kind of confused why I keep receiving this message.

I don't understand what you mean by this. You have set the primary keys manually on the object? If you did, than that's the problem, that's the job of EOF, not yours. :)


Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com





Miguel Arroz http://www.terminalapp.net http://www.ipragma.com




_______________________________________________ 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
References: 
 >JDBCAdaptor@b447de failed to provide new primary keys (From: Don Lindsay <email@hidden>)
 >Re: JDBCAdaptor@b447de failed to provide new primary keys (From: Miguel Arroz <email@hidden>)
 >Re: JDBCAdaptor@b447de failed to provide new primary keys (From: Don Lindsay <email@hidden>)
 >Re: JDBCAdaptor@b447de failed to provide new primary keys (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: JDBCAdaptor@b447de failed to provide new primary keys
  • Next by Date: Re: JDBCAdaptor@b447de failed to provide new primary keys
  • Previous by thread: Re: JDBCAdaptor@b447de failed to provide new primary keys
  • Next by thread: Re: JDBCAdaptor@b447de failed to provide new primary keys
  • Index(es):
    • Date
    • Thread