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

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


  • Subject: Re: How to fix "failed to provide new primary keys for..."?
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Mon, 17 Jan 2005 09:49:36 +0100

Normally I noticed that I get a failed to provide primary key error when I forget to create tables in the db (i forget to drop the sql from EO to the database), so i think the error is on that side. It could be also that you need a special adapter for PostgreSQL, i don't remember reading about direct support for it anywhere in the EO documentation.

My suggestion is to download OpenBase, sign up for a free license and try doing the same thing, only with OpenBase as data storage. See where it gets you...

Cheers
Florijan


On Jan 17, 2005, at 06:21, Ken Tozier wrote:

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

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

  • Prev by Date: Concurrency
  • Next by Date: [ANN] BestMatchQualifier: WHERE a IN (SELECT MAX(x) ...)
  • Previous by thread: How to fix "failed to provide new primary keys for..."?
  • Next by thread: Re: How to fix "failed to provide new primary keys for..."?
  • Index(es):
    • Date
    • Thread