Re: EOGeneralAdaptorException
Re: EOGeneralAdaptorException
- Subject: Re: EOGeneralAdaptorException
- From: Art Isbell <email@hidden>
- Date: Fri, 11 Apr 2003 09:15:16 -1000
On Friday, April 11, 2003, at 12:17 AM, Jonathan Fleming wrote:
This error seems as if it's trying to tell me that the ID is null and
shouldn't be if this is so, what have I done to my EO? Else what is
going on excatly here.
Error: com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:42000 -- error
code: 0 -- msg: ERROR - Value can not be NULL for column
'TB_CLIENT_ID' SQL: INSERT INTO TB_ADMIN_USER(ACCESS_LEVEL, COUNTRY,
LOGIN_NAME, TB_ADMIN_USER_ID, COMPANY_NAME, ADDRESS_LINE1, COUNTY,
FAX1, TEL1, ENTRY, CELLULAR, EMAIL1, EMAIL2, POSTCODE, TITLE,
FIRST_NAME, CITY_TOWN, LAST_NAME, ADDRESS_LINE2) VALUES (NULL, NULL,
'cleverglogs', 10, NULL, NULL, NULL, NULL, NULL, 'crunchit', NULL,
'email@hidden', NULL, NULL, NULL, 'Caroline', NULL,
'Flora-Jones', NULL)
Reason: EvaluateExpression failed:
<com.webobjects.jdbcadaptor.OpenBasePlugIn$OpenBaseExpression: "INSERT
INTO TB_ADMIN_USER(ACCESS_LEVEL, COUNTRY, LOGIN_NAME,
TB_ADMIN_USER_ID, COMPANY_NAME, ADDRESS_LINE1, COUNTY, FAX1, TEL1,
ENTRY, CELLULAR, EMAIL1, EMAIL2, POSTCODE, TITLE, FIRST_NAME,
CITY_TOWN, LAST_NAME, ADDRESS_LINE2) VALUES (NULL, NULL, ?, ?, NULL,
NULL, NULL, NULL, NULL, ?, NULL, ?, NULL, NULL, NULL, ?, NULL, ?,
NULL)" withBindings: 1:"cleverglogs"(loginName), 2:10(tbAdminUserID),
3:"crunchit"(entry), 4:"email@hidden"(email1),
5:"Caroline"(firstName), 6:"Flora-Jones"(lastName)>: Next
exception:SQL State:42000 -- error code: 0 -- msg: ERROR - Value can
not be NULL for column 'TB_CLIENT_ID' SQL: INSERT INTO
TB_ADMIN_USER(ACCESS_LEVEL, COUNTRY, LOGIN_NAME, TB_ADMIN_USER_ID,
COMPANY_NAME, ADDRESS_LINE1, COUNTY, FAX1, TEL1, ENTRY, CELLULAR,
EMAIL1, EMAIL2, POSTCODE, TITLE, FIRST_NAME, CITY_TOWN, LAST_NAME,
ADDRESS_LINE2) VALUES (NULL, NULL, 'cleverglogs', 10, NULL, NULL,
NULL, NULL, NULL, 'crunchit', NULL, 'email@hidden',
NULL, NULL, NULL, 'Caroline', NULL, 'Flora-Jones', NULL)
If you follow the exceptions from top to bottom, the last exception is
what caused the others. In your DB, you have set TB_CLIENT_ID to be a
not null column, yet the SQL generated by EOF doesn't even include
TB_CLIENT_ID. So your eomodel must be broken. Assuming that
TbClientId is a foreign key (shouldn't be a class property), maybe the
relationship to TbClient isn't a class property but should be. Or
maybe you need to set the TB_CLIENT_ID column to allow null. Only you
can determine what's correct.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.