Re: How to fix "failed to provide new primary keys for..."?
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