Natural-id : NullPointerException after persisting null String value, if using @NaturalIdCache

This commit is contained in:
Guenther Demetz 2012-04-10 12:31:45 +03:00 committed by Strong Liu
parent 88e231f50b
commit 7abdf80ebe
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class NaturalIdCacheKey implements Serializable {
final Type type = propertyTypes[naturalIdPropertyIndexes[i]];
final Object value = naturalIdValues[i];
result = prime * result + type.getHashCode( value, factory );
result = prime * result + (value != null ? type.getHashCode( value, factory ) : 0);
disassembledNaturalId[i] = type.disassemble( value, session, null );