// Check for the case of serialised maps, and assign StateManagers to any PC keys/values without
AbstractMemberMetaData fmd = ownerSM.getClassMetaData().getMetaDataForMember(fieldName);
if (SCOUtils.mapHasSerialisedKeysAndValues(fmd) &&
(fmd.getMap().getKeyClassMetaData() != null || fmd.getMap().getValueClassMetaData() != null))
{
ObjectManager om = ownerSM.getObjectManager();
Iterator iter = m.entrySet().iterator();
while (iter.hasNext())
{
Map.Entry entry = (Map.Entry)iter.next();
Object key = entry.getKey();
Object value = entry.getValue();
if (fmd.getMap().getKeyClassMetaData() != null)
{
StateManager objSM = om.findStateManager(key);
if (objSM == null)
{
objSM = StateManagerFactory.newStateManagerForEmbedded(om, key, false);
objSM.addEmbeddedOwner(ownerSM, fieldNumber);
}
}
if (fmd.getMap().getValueClassMetaData() != null)
{
StateManager objSM = om.findStateManager(value);
if (objSM == null)
{
objSM = StateManagerFactory.newStateManagerForEmbedded(om, value, false);
objSM.addEmbeddedOwner(ownerSM, fieldNumber);
}