Can not use reference map in childObjectMap in relation operations
@@ -56,7 +56,7 @@ class TransactionHelper
{
List<Object> objectIds = new ArrayList<>();
for( Map<String, Object> objectMap : objectsMaps )
- objectIds.add( convertObjectMapToObjectIdOrLeaveReference( objectMap ) );
+ objectIds.add( convertObjectMapToObjectId( objectMap ) );
return objectIds;
}
@@ -73,24 +73,6 @@ class TransactionHelper
return (String) maybeObjectId;
}
- static Object convertObjectMapToObjectIdOrLeaveReference( Map<String, Object> objectMap )
- {
- if( objectMap == null || objectMap.isEmpty() )
- throw new IllegalArgumentException( ExceptionMessage.NULL_EMPTY_MAP );
-
- if( objectMap.containsKey( UnitOfWork.REFERENCE_MARKER ) )
- {
- objectMap.put( UnitOfWork.PROP_NAME, Persistence.DEFAULT_OBJECT_ID_FIELD );
- return objectMap;
- }
-
- Object maybeObjectId = objectMap.get( Persistence.DEFAULT_OBJECT_ID_FIELD );
- if( !( maybeObjectId instanceof String ) )
- throw new IllegalArgumentException( ExceptionMessage.NULL_OBJECT_ID_IN_OBJECT_MAP );
-
- return maybeObjectId;
- }
-
// accept children not String[], it check before
static <E> List<String> getObjectIdsFromListInstances( E[] children )
{
