I don't know what is causing you the primary key generation problem. I probably hit similar problem before but could not recall : (.. I am using the following combination and it works well for me at the moment. You may want to cross-check if this could be of help:

WO5.2.4/ Connector-J v3.1.13 / MYSQL v5

Note that the last two combination are more important, and i think these shall work well for WO5.2.3 too.

Cheers

Cheong Hee

I am also confused how such an obvious thing (primary key
generation) could
be a bug when WO is certified for MySQL ;-) :-(

I think I have tracked down the problem (that was causing the
problem
with horizontal inheritance).  Primary key's don't seem to be
getting
set correctly when using the latest MySQL and WebObjects.

EOF creates the eo_pk_table ok and tracks the primary key values ok,
but when it writes new records to tables, EOF doesn't seem to write
the primary key value.

Hence, all primary key values are set to 0, or at least the first
one
is, the second attempt to add a new row fails because the primary
key
is the same.

This is the sort of error I am getting:

 com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression
failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression:
"INSERT INTO sdclient(sdcountry, sdemailaddress, sdstreetaddress,
sdfaxnumber, sdphonenumber, sdclientcode, sdpostaladdress, sdname,
sdpostcode, sdstate) VALUES (NULL, NULL, ?, NULL, NULL, ?, NULL, ?,
NULL, NULL)" withBindings: 1:"B"(streetAddress), 2:"B"(clientCode),
3:"B"(name)>:
    Next exception:SQL State:S1009 -- error code: 1062 -- msg:
Invalid
argument value,  message from server: "Duplicate entry '0' for
key 1"

Note, EOF does not seem to be writing the column "sdclientpk" even
though it is a part of the model, and it is set at the primary
key for
that table.

Any ideas, suggestions, obvious errors, most appreciated.

Cheers,
Ashley.


_______________________________________________
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