For simple primary key fetches the correct method to use is:

EOutilities.objectWithPrimaryKeyValue(EOEditingContext ec, String entityName, Object value)

and if the PK exists you would simply do:

EoEditingContext ec = ...;
String entityName = "DbTest"; ( or "Test"? .. or DbTest.ENTITY_NAME if using eogen)

DbTest eo = (DbTest)EOUtilities.objectWithPrimaryKeyValue(ec, entityName, Object value)

BTW, some good resources:
http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/index.html
http://wiki.objectstyle.org/




On Nov 7, 2008, at 5:44 AM, Tim Kitchener wrote:

Since changing the database engine to InnoDB, I no longer get the locking error. Just a com.webobjects.eoaccess.EOGeneralAdaptorException: updateStatementForRow: qualifier may not be null exception whenever I call saveChanges() on my editing context.

My primary key is set up as follows:

<Picture 1.png>




Hi TimMay be you could try with:DbTest dbObj = (DbTest) EOUtilities.objectMatchingKeyAndValue (ec, "Test", "priKey", new Integer(0));>> DbTest dbObj = (DbTest) EOUtilities.objectMatchingKeyAndValue (ec,
"Test", "priKey", 0);


Cheers

Cheong Hee




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to