Re: Making Primary Keys with SQLServer/PostgreSQL
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.