code: public Map<String, Object> createNodeProperties(Object entity, EntityMetadata m)
      {
          Map<String, Object> props = new HashMap<String, Object>();
  
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(
                  m.getPersistenceUnit());
  
          EntityType entityType = metaModel.entity(m.getEntityClazz());
  
          // Iterate over entity attributes
          Set<Attribute> attributes = entityType.getSingularAttributes();
          for (Attribute attribute : attributes)
          {
              Field field = (Field) attribute.getJavaMember();
  
              // Set Node level properties
              if (!attribute.isCollection() && !attribute.isAssociation())
              {
  
                  String columnName = ((AbstractAttribute) attribute).getJPAColumnName();
                  Object value = PropertyAccessorHelper.getObject(entity, field);
                  if (value != null)
                  {
                      props.put(columnName, toNeo4JProperty(value));
                  }
              }
          }
          return props;
      }
docs: Creates a Map containing all properties (and their values) for a given
  entity
  
  @param entity
  @param m
  @return