• 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: Ken Tozier <email@hidden>
  • Date: Mon, 17 Jan 2005 13:09:54 -0500


On Jan 17, 2005, at 6:01 AM, Johan Henselmans wrote:


On 17-jan-05, at 6:21, Ken Tozier wrote:

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



Normally, with a database there is some kind of plugin to work around the quirks of that particular database in relation to the sql syntax that eof expects. That is also the case with postgresql.


When you create a psql database, most of the time the primary key is supplied by a sequence. So, a people table would also assume a people_seq table and a table for the primary key, normally named people_pk, or people_pkey or something like that. That is the construction that the original postgresqlplugin framework from hexdreams was using. The postgresql plugin from projectwonder uses a people_SEQ table, and a people_pk table. Are these table available, when you connect to the database with psql and do a description of sequences with \ds, and a description of indexes with \di?

I'm using org.postgresql.Driver which allows me to create new EOModels. I'll look into that other stuff as well but one of the problems was that the little diamond in the EOModel table view that signifies server side property was unchecked. When I activated the diamond, I was able to save from both the web and java client applications.


Seems kind of odd that you have to expose the PK field to the user and force them to enter a number to save. Hopefully your suggestions will do the trick.

Thanks

Ken



Did you add the jdbc jar, and the postgresql plugin framework to the project? What is the sql code that you get when creating the database from the model?



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:
email@hidden


This email sent to email@hidden


-johan

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852

_______________________________________________ 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: Chuck Hill <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>)
 >Re: How to fix "failed to provide new primary keys for..."? (From: Johan Henselmans <email@hidden>)

  • Prev by Date: Re: Health of WebObjects - developer/user base?
  • Next by Date: Merging Frameworks into an Application
  • Previous by thread: Re: Client IP
  • Next by thread: Re: How to fix "failed to provide new primary keys for..."?
  • Index(es):
    • Date
    • Thread