code: private Object handleAssociation(final Object entity, final Map<String, Object> relationsMap,
              final EntityMetadata m, final PersistenceDelegator pd, boolean lazilyloaded,
              Map<Object, Object> relationStack)
      {
  
          for (Relation relation : m.getRelations())
          {
              if (relation != null)
              {
                  ForeignKey relationType = relation.getType();
  
                  Object relationalObject = PropertyAccessorHelper.getObject(entity, relation.getProperty());
  
                  if (KunderaCoreUtils.isEmptyOrNull(relationalObject)
                          || ProxyHelper.isProxyOrCollection(relationalObject))
                  {
                      onRelation(entity, relationsMap, m, pd, relation, relationType, lazilyloaded, relationStack);
                  } // a bit of hack for neo4j only
                  else if (!ProxyHelper.isProxyOrCollection(relationalObject)
                          && Map.class.isAssignableFrom(relationalObject.getClass()))
                  {
                      Map relationalMap = (Map) relationalObject;
                      for (Map.Entry entry : (Set<Map.Entry>) relationalMap.entrySet())
                      {
                          Object entityObject = entry.getValue();
                          if (entityObject != null)
                          {
                              EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata,
                                      entityObject.getClass());
                              PersistenceCacheManager.addEntityToPersistenceCache(entityObject, pd,
                                      PropertyAccessorHelper.getId(entityObject, metadata));
                          }
                      }
                  }
              }
          }
          return entity;
      }
docs: Recursively fetches associated entities for a given <code>entity</code>
  
  @param entity
  @param relationsMap
  @param client
  @param m
  @param pd
  @param relationStack
  @return