On Feb 4, 2008, at 9:54 AM, Sennikov, Dimitri
wrote:
Hi,
I have a
clients table that refers to an address row in WA_Addresses entity. I get the
following exception where WO is trying to save without including ‘id’ attribute.
EvaluateExpression
failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression:
"INSERT INTO WA_Addresses(phone1, phone2, phone3, city, state, country,
postalCode, address1, webSite, email, fax, address2) VALUES (NULL, NULL, NULL,
NULL, NULL, NULL, NULL, ?, NULL, NULL, NULL, ?)" withBindings:
1:"c"(address1), 2:"d"(address2)>: Next exception:SQL
State:HY000 -- error code: 1364 -- msg: Field 'id' doesn't have a default value
I’m trying
to save an EO from the projects entity, that references a Client entity, which
in turn references the Address entity. In the end, I get this error. After some
of my playing around, the following are my eo_pk_table contents:
+--------------+------+
|
NAME | PK |
+--------------+------+
|
WA_Clients | 65 |
|
Est_Projects | 70 |
|
WA_Addresses | 13 |
+--------------+------+
Has anybody
come across this? Can there be anything that I need to do in the code to
resolve this?
Kind regards,
Dmitri
Sennikov