• 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: PK Generation in PostgreSQL 7.3 with WO 5.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PK Generation in PostgreSQL 7.3 with WO 5.1


  • Subject: Re: PK Generation in PostgreSQL 7.3 with WO 5.1
  • From: MJE <email@hidden>
  • Date: Mon, 24 Feb 2003 10:37:56 +1100

Thanks for the helpful information. I'm not currently using a plugin. I was able to overcome the problem with Tore's suggestion of creating the EO_PK_TABLE. Two questions:

1. Which PostgreSQL plugin are you referring to? The ones at <http://www.hexdreams.com/>?

2. Would it be better to use these (or other) plugins to allow WO to use the db's own sequences for pk generation, or is it best to use the EO_PK_TABLE solution?

I note that according to the documentation at <http://developer.apple.com/techpubs/webobjects/Enterprise_Objects/ Saving/chapter_8_section_5.html>, WO tries 4 things to generate pk's (for records that don't already have pk's). Presumably, a plugin would provide option 2, and the EO_PK_TABLE solution is option 4.

MJE

On Friday, February 21, 2003, at 05:29 PM, Art Isbell wrote:
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.

On Friday, February 21, 2003, at 05:38 PM, Tore Halset wrote:
On fredag, feb 21, 2003, at 05:47 Europe/Oslo, MJE wrote:

Has anyone had any experience using WO 5.1 with PostgreSQL 7.3 on Mac OS 10.2?

I'm having trouble when saving an editing context after inserting an EOGenericRecord subclass (new record/object created programatically).

Are you using the PostgreSQL plugin? The plugin uses sequences for pk-generation. I am not using that plugin and had to make a table called EO_PK_TABLE for WO's default schema for pk-generation.


create table EO_PK_TABLE (NAME char(40) primary key, PK int);
_______________________________________________
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.

References: 
 >Re: PK Generation in PostgreSQL 7.3 with WO 5.1 (From: Tore Halset <email@hidden>)

  • Prev by Date: Re: lockRowComparingAttributes - what is this?
  • Next by Date: Re: locking editing context
  • Previous by thread: Re: PK Generation in PostgreSQL 7.3 with WO 5.1
  • Next by thread: Trial version 5.2 does not work
  • Index(es):
    • Date
    • Thread