• 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
How to fix "failed to provide new primary keys for..."?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to fix "failed to provide new primary keys for..."?


  • Subject: How to fix "failed to provide new primary keys for..."?
  • From: Ken Tozier <email@hidden>
  • Date: Mon, 17 Jan 2005 00:21:46 -0500

I've been struggling with my first WO project and have run up against an error for which I can't find an answer. I read the documentation related to key generation here: "http://developer.apple.com/documentation/WebObjects/ Enterprise_Objects/Saving/chapter_8_section_5.html#//apple_ref/doc/uid/ TP30001011-DontLinkChapterID_14-TPXREF151"

but am not getting anywhere.

The project type is a direct to java client created in Xcode 1.5 that connects to a PostgreSQL database containing one simple table defined like so:

CREATE TABLE people (
	_id	int4 NOT NULL PRIMARY KEY,
	first_name text,
	last_name text
);

The EOModel looks to be OK but when I fire up the app and try to enter new data, I get the following error:

"Save failed: Server exception Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@689e12 failed to provide new primary keys for entity 'People'!"

According to the key generation page above, the JDBC adaptor should be able to generate PK's if they are simple integers (which mine are) so can anyone shed any light on what I might be doing wrong?

Thanks for any help

Ken

_______________________________________________
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: How to fix "failed to provide new primary keys for..."?
      • From: Johan Henselmans <email@hidden>
    • Re: How to fix "failed to provide new primary keys for..."?
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >Propagate Primary Key Confusion? (From: Kieran Kelleher <email@hidden>)
 >Re: Propagate Primary Key Confusion? (From: Art Isbell <email@hidden>)

  • Prev by Date: Re: Propagate Primary Key Confusion?
  • Next by Date: Concurrency
  • Previous by thread: Re: Propagate Primary Key Confusion?
  • Next by thread: Re: How to fix "failed to provide new primary keys for..."?
  • Index(es):
    • Date
    • Thread