• 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: Postgresql Connection [fixed] => [working with serial columns]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Postgresql Connection [fixed] => [working with serial columns]


  • Subject: Re: Postgresql Connection [fixed] => [working with serial columns]
  • From: Hunter Hillegas <email@hidden>
  • Date: Wed, 4 May 2005 22:26:42 -0700

FYI, we use the WONDER version for a site that gets tens of millions of visitors per month and it works great.

On May 4, 2005, at 8:37 PM, LD wrote:

Hi all,

I haven't looked at the Project Wonder version of PostgresqlPlugin (I couldn't see it as a separate download) but the following fix to the hexdreams version fixes the problem...

public NSArray newPrimaryKeys (int count, EOEntity entity, JDBCChannel channel) {
<...>
// original Hexdreams code:
//sequenceName = entity.primaryKeyRootName() + "_SEQ";


// BEGIN FIX:
// According to Postgres docs:
// http://www.postgresql.org/docs/faqs.FAQ.html#4.11.2
// sequenceName form: <entityName>_<pkColumnName>_SEQ
sequenceName = entity.primaryKeyRootName();
sequenceName += "_";
sequenceName += ((EOAttribute)entity.primaryKeyAttributes ().objectAtIndex(0)).columnName();
sequenceName += "_SEQ";
// END FIX


expression = new PostgresqlExpression(entity);
expression.setStatement("SELECT NEXTVAL('" + sequenceName + "')");
results = new NSMutableArray();
priKeyAttributeName = ((EOAttribute)entity.primaryKeyAttributes ().objectAtIndex(0)).name();
<...>
}


what would be interesting to know is 'what is the jdbc driver missing for this plug-in to be needed at all?'

with regards,
--

Lachlan Deck

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden


_______________________________________________ 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: Postgresql Connection [fixed] => [working with serial columns]
      • From: LD <email@hidden>
References: 
 >Re: Postgresql Connection (again) - failure to create primary keys (From: LD <email@hidden>)
 >Re: Postgresql Connection (again) - failure to create primary keys (From: LD <email@hidden>)
 >Re: Postgresql Connection [fixed] => [working with serial columns] (From: LD <email@hidden>)

  • Prev by Date: Re: Postgresql Connection [fixed] => [working with serial columns]
  • Next by Date: Table locking Issue MySQL on Tiger...
  • Previous by thread: Re: Postgresql Connection [fixed] => [working with serial columns]
  • Next by thread: Re: Postgresql Connection [fixed] => [working with serial columns]
  • Index(es):
    • Date
    • Thread