if(rawValue instanceof NSMutableData) {
// AK: wtf!! I got an exception
// java.lang.IllegalArgumentException: Attempt to create an EOGlobalID for the entity "Asset" with a primary key component of type com.webobjects.foundation.NSMutableData instead of type com.webobjects.foundation.NSData!
// so this is a lame attempt to fix it.
rawValue = new NSData((NSMutableData)rawValue);
}
EOAttribute attribute = pks.objectAtIndex(0);
Object value = rawValue;
value = attribute.validateValue(value);
pk.setObjectForKey(value, attribute.name());