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

Re: "failed to provide new primary keys for entity"


  • Subject: Re: "failed to provide new primary keys for entity"
  • From: Kieran Kelleher <email@hidden>
  • Date: Wed, 24 Feb 2010 22:47:44 -0500

I have seen this about 3 or 4 times long time ago - IIRC, the problem was something to do with either EC or OSC locking.

In any case, I use MySQL - even the majority of WO users, except Chuck Hill, use MySQL - and it works.

-Kieran

On Feb 23, 2010, at 3:00 PM, Johnny Miller wrote:

Hi,

I have a many to many join with flattened relationships that I created using the new relationship wizard in Entity Modeler.

I then added a class property to the intermediary table and changed the class name from EOGeneric record to an appropriate one for the entity and package.  Basically I need to know the "order" of the objects in the table so I ascribed a position value.

After I create the object and attempt to save it I'm getting the error "failed to provide new primary keys for entity".  I've checked the database and the table exists, the foreign keys are created and I've actually compared it to another table/model where I've done exactly the same thing without an issue.


I'm using ...
WO 5.4.3
Recent version of Wonder
MySQL 5.1.37, using the MySQL plugin supplied by someone on the list .
OS X 10.6

stack trace:

IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@779a639b failed to provide new primary keys for entity 'MAP_Gallery_Image'
  at com.webobjects.eoaccess.EODatabaseContext.prepareForSaveWithCoordinator(EODatabaseContext.java:5713)
  at com.webobjects.eocontrol.EOObjectStoreCoordinator.saveChangesInEditingContext(EOObjectStoreCoordinator.java:370)
  at com.webobjects.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:3192)
  at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
  at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
  at com.kahalawai.components.pages.media.SetGalleryImagesPage.saveChanges(SetGalleryImagesPage.java:63)
  ... skipped 68 stack elements

I don't see an insert SQL command in the SQL log.


Johnny Miller
Kahalawai Media Corp
http://www.kahalawai.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: 
 >"failed to provide new primary keys for entity" (From: Johnny Miller <email@hidden>)

  • Prev by Date: Re: "failed to provide new primary keys for entity"
  • Next by Date: Oh the joys of Eclipse...
  • Previous by thread: Re: "failed to provide new primary keys for entity"
  • Next by thread: Error on deployment - Can't connect to window server
  • Index(es):
    • Date
    • Thread