• 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: Making Primary Keys with SQLServer/PostgreSQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making Primary Keys with SQLServer/PostgreSQL


  • Subject: Re: Making Primary Keys with SQLServer/PostgreSQL
  • From: Art Isbell <email@hidden>
  • Date: Thu, 20 Feb 2003 20:29:11 -1000

On Thursday, February 20, 2003, at 03:40  PM, Riaz Lalehzari wrote:

Whenever I try to add a new entry to a table in the db, a primary key isn't made for me and I get this error:
Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@d0357a failed to provide new primary keys for entity 'PublicSite'

On Thursday, February 20, 2003, at 06:47 PM, MJE wrote:

I'm having trouble when saving an editing context after inserting an EOGenericRecord subclass (new record/object created programatically). The error below is returned. Will I have to implement databaseContextNewPrimaryKey* for every EOEntity? Is there a better way? OpenBase takes care of this nicely, but we have to use PostgreSQL for this project.

EOF requires that primary keys be set before a new object is saved to the database, so it's best not to use whatever automatic primary key generation a database might provide. Instead, let EOModeler generate the SQL required to get the database to return primary key values and execute this SQL via EOModeler.


I know that SQLServer supports this primary key generation procedure, but I don't know whether PostgreSQL does.

Art
http://homepage.mac.com/aisbell/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Making Primary Keys with SQLServer/PostgreSQL
      • From: Jonathan Rochkind <email@hidden>
References: 
 >Making Primary Keys with SQLServer (From: "Riaz Lalehzari" <email@hidden>)

  • Prev by Date: PK Generation in PostgreSQL 7.3 with WO 5.1
  • Next by Date: Re: PK Generation in PostgreSQL 7.3 with WO 5.1
  • Previous by thread: Making Primary Keys with SQLServer
  • Next by thread: Re: Making Primary Keys with SQLServer/PostgreSQL
  • Index(es):
    • Date
    • Thread