code: private void addToWrapper(EntityMetadata entityMetadata, AttributeWrapper wrapper, Object embeddedObject,
              Attribute attrib, Attribute embeddedAttrib)
      {
          if (embeddedObject == null)
          {
              return;
          }
          
          byte[] value = PropertyAccessorHelper.get(embeddedObject, (Field) attrib.getJavaMember());
          byte[] name;
          if (value != null)
          {
              if (embeddedAttrib == null)
              {
                  name = getEncodedBytes(((AbstractAttribute) attrib).getJPAColumnName());
              }
              else
              {
                  name = getEncodedBytes(getHashKey(embeddedAttrib.getName(),
                          ((AbstractAttribute) attrib).getJPAColumnName()));
              }
              // add column name as key and value as value
              wrapper.addColumn(name, value);
              // // {tablename:columnname,hashcode} for value
  
              // selective indexing.
              if (entityMetadata.getIndexProperties().containsKey(((AbstractAttribute) attrib).getJPAColumnName()))
              {
                  String valueAsStr = PropertyAccessorHelper.getString(embeddedObject, (Field) attrib.getJavaMember());
                  wrapper.addIndex(
                          getHashKey(entityMetadata.getTableName(), ((AbstractAttribute) attrib).getJPAColumnName()),
                          getDouble(valueAsStr));
  
                  wrapper.addIndex(
                          getHashKey(entityMetadata.getTableName(),
                                  getHashKey(((AbstractAttribute) attrib).getJPAColumnName(), valueAsStr)),
                          getDouble(valueAsStr));
              }
          }
      }
docs: Wraps entity attributes into redis format byte[].
  
  @param entityMetadata
  the entity metadata
  @param wrapper
  the wrapper
  @param embeddedObject
  the embedded object
  @param attrib
  the attrib
  @param embeddedAttrib
  the embedded attrib