code: private Object getEntityWithAssociationFromNode(EntityMetadata m, Node node)
      {
          Map<String, Object> relationMap = new HashMap<String, Object>();
  
          /**
           * Map containing Node ID as key and Entity object as value. Helps cache
           * entity objects found earlier for faster lookup and prevents repeated
           * processing
           */
          Map<Long, Object> nodeIdToEntityMap = new HashMap<Long, Object>();
  
          Object entity = mapper.getEntityFromNode(node, m);
  
          nodeIdToEntityMap.put(node.getId(), entity);
          populateRelations(m, entity, relationMap, node, nodeIdToEntityMap);
  
          nodeIdToEntityMap.clear();
  
          if (!relationMap.isEmpty() && entity != null)
          {
              return new EnhanceEntity(entity, PropertyAccessorHelper.getId(entity, m), relationMap);
          }
          else
          {
              return entity;
          }
  
      }
docs: Gets the entity with association from node.
  
  @param m
  the m
  @param node
  the node
  @return the entity with association from node