Re: Need To Get PrimaryKey ID
Re: Need To Get PrimaryKey ID
- Subject: Re: Need To Get PrimaryKey ID
- From: George Domurot <email@hidden>
- Date: Fri, 21 Mar 2003 17:26:49 -0500
Try this...
public Number primaryKey(){
try{
NSDictionary primaryKeys =
EOUtilities.primaryKeyForObject(editingContext(),
(EOEnterpriseObject)this);
NSArray keyValues = primaryKeys.allValues();
return (Number)keyValues.objectAtIndex(0);
} catch (Exception e){
}
return null;
}
On Friday, March 21, 2003, at 02:44 PM, Jonathan Fleming wrote:
public Integer tbClientID() {
EOEnterpriseObject tbJobPicture = (EOEnterpriseObject)
valueForKeyPath("tbJob");
NSDictionary primaryKey =
EOUtilities.primaryKeyForObject(tbJobPicture.editingContext(), tbJob);
NSLog.out.appendln("Dictionary to get tbClientID: " +
primaryKey);
String strID = new String();
strID = String.valueOf( (Integer)
primaryKey.valueForKey("tbClientID") );
setTb_ClientID(strID);
return (Integer) primaryKey.valueForKey("tbClientID");
}
_______________________________________________
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.