Guido,

On Sep 10, 2008, at 5:42 PM, Guido Neitzer wrote:

someone who understands how exactly does EOF generate PK's with
FrontBase and the default setup (PK's generated automatically) -- any
idea whether (and if so, why) a duplicated PK can be generated?

Inserting data in the table without using "select unique from foo;" to get the primary key and then not resetting the unique sequence to a correct
value.


Well, thanks... and do you please have any idea what might cause "inserting data without using ... etc."?

I do not mess with the SQL generation at all*, so I can't forget using "select unique..." myself; all I am doing is creating EO's and then calling editingContext.saveChanges -- which reports the aforementioned error. Thus, self-evidently it's the EOF stack (or FrontBase plugin or whoever) forgetting the "select unique"; how could I (a) find who it is, (b) fix it?

* actually, I am exploiting the trick Cail Borrell suggested, to make a unique sequential column by replacing a number value by some generated SQL of lines "select max(xxx) from..."; but it should be completely irrelevant here, for (a) it does not do anything with PK's at all, (b) it is used with a different table anyway.

Thanks,
---
Ondra Čada
OCSoftware:     [EMAIL PROTECTED]               http://www.ocs.cz
private         [EMAIL PROTECTED]             http://www.ocs.cz/oc



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to