EODisplayGroup problem
EODisplayGroup problem
- Subject: EODisplayGroup problem
- From: "Manish Sharma" <email@hidden>
- Date: Thu, 10 Jul 2003 16:33:13 +0530
Hi All
I am using EODisplayGroup to insert an object into database from Java
Client application.
Here is the code snippet:-
1. EODisplayGroup _barCodeScan1;
2. EOEditingContext _editingContext;
3. NSMutableDictionary objDict = new NSMutableDictionary();
4. objDict.setObjectForKey("201","centerNumber");
5. objDict.setObjectForKey("StudentData","data");
6. objDict.setObjectForKey("101","scannerSerialNumber");
7. objDict.setObjectForKey("04/04/04","timestamp");
8. _barCodeScan1.setInsertedObjectDefaultValues(objDict);
9. _barCodeScan1.insert();
10. _editingContext.saveChanges();
At line no 9, I am getting the following error
<com.webobjects.eocontrol.EOGenericRecord 0xc1a0eb> takeValueForKey():
attempt to assign value to unknown key: 'centerNumber'. This class does
not have an instance variable of the name centerNumber or _centerNumber,
nor a method of the name setCenterNumber or _setCenterNumber
It seems that while inserting default object displaygroup is looking for
instance variable in EOGenericRecord Class instead of actual Entity
Class.
I try to print the name of the Class associated with datasource like
this
String locEntityName =
_barCodeScan1.dataSource().classDescriptionForObjects().entityName();
It is printing the correct Entity name but still problem is there while
running the above code.
Can anybody tell me what could be the problem here?
Thanks
Regards
Manish Sharma
Avesta Computer Services
<mailto:email@hidden> email@hidden
020-6113187x114 (W)
020-6681814 (H)
_______________________________________________
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.