I'm having trouble getting a simple anonymous key example working in my tests. My class descriptor is something like this:
<class-descriptor class="domain.ChangeStatus" table="gov_change_status"> <field-descriptor id="1" name="id" column="id" jdbc-type="INTEGER" nullable="false" primarykey="true" access="readonly" autoincrement="true" /> <field-descriptor id="2" name="statusId" column="status_id" jdbc-type="INTEGER" nullable="false" access="anonymous" /> <field-descriptor id="3" name="changeSubmissionId" column="change_submission_id" jdbc-type="INTEGER" nullable="false" access="anonymous" /> <reference-descriptor name="status" class-ref="domain.StatusMaster"> <foreignkey field-ref="statusId" /> </reference-descriptor> <reference-descriptor name="changeSubmission" class-ref="domain.ChangeSubmission"> <foreignkey field-ref="changeSubmissionId" /> </reference-descriptor> </class-descriptor> My Java class looks roughly like this: public class ChangeStatus extends BaseObject { // private int statusId; // private int changeSubmissionId; private StatusMaster status; private ChangeSubmission changeSubmission; // setters and getters... } The Desk and Drawer example says to add access="anonymous" to the field descriptor and it should start to work but I consistently get this error: * SQLException during execution of sql-statement: * sql statement was 'INSERT INTO gov_change_status (status_id,change_submission_id,date_created,date_modified) VALUES (?,?,?,?) ' * Exception message is [Column 'STATUS_ID' cannot accept a NULL value.] * Vendor error code [30000] * SQL state code [23502=NOT NULL VIOLATION] * Target class is 'domain.ChangeStatus' * PK of the target object is [id=0] * Source object: [EMAIL PROTECTED]@19e3e24[type=Submitted,subType=Dummy,labelForType=<null>,description=Acknowle dgement of Receipt of Change Request,externalStatus=true,dateCreated=2006-09-01 09:44:09.592,dateModified=2006-09-01 09:44:09.592,id=15],[EMAIL PROTECTED],catalogVersion=100,submittedBy=mperham,submissionDate=Fri Sep 01 09:44:09 CDT 2006,commitDate=<null>,shortDescription=Short desc,longDescription=Long desc,externalGovId=<null>,changeStatuses=[],topLevelElements=[],externalSubmissions=[],dateCreated=2006-09-01 09:44:09.592,dateModified=2006-09-01 09:44:09.592,id=1],changeApprovals=<null>,changeDocuments=<null>,dateCreated=2006-09-01 09:44:09.733,dateModified=2006-09-01 09:44:09.733,id=0] If I create and set the FK ID fields explicitly (the commented out fields in the java code above), it works fine. What am I missing? mike --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]