• 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: Primary Key Generation with MySQL and EOF?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Primary Key Generation with MySQL and EOF?


  • Subject: Re: Primary Key Generation with MySQL and EOF?
  • From: "Cheong Hee (Datasonic)" <email@hidden>
  • Date: Tue, 5 Jun 2007 18:08:40 +0800

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: WOLips resolving methods in the class hierarchy
  • Next by Date: Re: Apache FOP and & in strings
  • Previous by thread: Re: Primary Key Generation with MySQL and EOF?
  • Next by thread: ANN: PDFGenerator 2.1 update coming
  • Index(es):
    • Date
    • Thread