• 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: Problem with sequences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with sequences


  • Subject: Re: Problem with sequences
  • From: Theodore Petrosky <email@hidden>
  • Date: Wed, 14 Aug 2013 20:32:06 -0400

you said it only happens on the production box. I have a couple of deployment boxes that I test deployments. can you duplicate this. and what about the postgresql.jar. I always copy that to my Library folder and add it to the Build Path.


On Aug 14, 2013, at 8:24 PM, Johnny Miller <email@hidden> wrote:

Hi Ted,

Everything is going through EOF.  I'm not doing any manual inserts.

But what I think is happening is that if the PostgreSQL plugin is only in the framework and not the application itself for some reason EOF reverts to using eo_pk_table.

I'm testing right now to see if that is the case.

Thanks,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail

On Aug 14, 2013, at 2:17 PM, Theodore Petrosky <email@hidden> wrote:

I've noticed that WO's order of events is to read the lastvalue, then to create an insert that includes the id. then it updated the sequence. so you can get out of sequence if you manually inserted any rows and didn't check to make sure you updated the seq.

that said, i have a table with a sequence and I inserted data using the next value from the sequence (lastvalue was 9)

insert into table (firstname, id) values ('ted', 10);

it inserted correctly into the user table however because I supplied the id value, it did not update the sequence. This is documented behavior. 

How you got out of sync I don't know. Either you manually added a row, or you are getting in the way of WO and inserting using raw SQL (you can but you will have to resolve the primary key).

I don't know if this is the issue. Just my musings

Ted


On Aug 14, 2013, at 6:30 PM, Johnny Miller <email@hidden> wrote:

Hi,

I'm using a PostgreSQL database and I'm having a problem with the sequence not getting updated.

I'm using ERAttachment and I have pages that will generate thumbnails of the attachment for specific sizes.  And for some reason when creating the thumbnail it will not update the sequence for ERAttachment.  It stops using the sequence to generate the ID and switches over to EO_PK_TABLE so the thumbnails get properly saved.  But the next time I go to add an attachment I get a EO general adapter exception because the sequence is behind the value in EO_PK_TABLE which holds the last generated ID.

And it only seems to do this in production on my OS X 10.5.8 server box.

Has anybody seen this before?

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail
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: Problem with sequences
      • From: Johnny Miller <email@hidden>
References: 
 >Problem with sequences (From: Johnny Miller <email@hidden>)
 >Re: Problem with sequences (From: Theodore Petrosky <email@hidden>)
 >Re: Problem with sequences (From: Johnny Miller <email@hidden>)

  • Prev by Date: Re: Problem with sequences
  • Next by Date: Re: Problem with sequences
  • Previous by thread: Re: Problem with sequences
  • Next by thread: Re: Problem with sequences
  • Index(es):
    • Date
    • Thread