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
|