diff --git a/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXGenericRecord.java b/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXGenericRecord.java index ff7f81f8d48..e4db50a6d59 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXGenericRecord.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/eof/ERXGenericRecord.java @@ -776,7 +776,8 @@ public NSDictionary rawPrimaryKeyDictionary(boolean inTransactio private NSDictionary createUuidPrimaryKey(NSArray primaryKeyAttributes) { if (primaryKeyAttributes.count() == 1) { EOAttribute primaryKeyAttribute = primaryKeyAttributes.objectAtIndex(0); - if (primaryKeyAttribute.prototypeName().equals(uuidPrototypeName)) { + String prototypeName = primaryKeyAttribute.prototypeName(); + if (prototypeName != null && prototypeName.equals(uuidPrototypeName)) { return new NSDictionary(UUIDUtilities.generateAsNSData(), primaryKeyAttribute.name()); } }