} else if (ownerFmd.hasMap() && ownerFmd.getValueMetaData() != null
&& ownerFmd.getValueMetaData().getMappedBy() != null) {
// 1-N Map with value stored in the key
colmdContainer = ownerFmd.getKeyMetaData();
}
CorrespondentColumnsMapper correspondentColumnsMapping =
new CorrespondentColumnsMapper(colmdContainer, ownerIdMapping, true);
int countIdFields = ownerIdMapping.getNumberOfDatastoreMappings();
for (int i = 0; i < countIdFields; i++) {
DatastoreMapping refDatastoreMapping = ownerIdMapping.getDatastoreMapping(i);
JavaTypeMapping mapping = storeMgr.getMappingManager()
.getMapping(refDatastoreMapping.getJavaTypeMapping().getJavaType());
ColumnMetaData colmd = correspondentColumnsMapping.getColumnMetaDataByIdentifier(
refDatastoreMapping.getDatastoreField().getIdentifier());
if (colmd == null) {
throw new NucleusFatalUserException(
String.format("Primary Key column \"%s\" for table \"%s\" is not mapped.",
refDatastoreMapping.getDatastoreField().getIdentifier(),