code: public static Object fromBytes(EntityMetadata m, MetamodelImpl metaModel, byte[] b)
      {
          Class idFieldClass = m.getIdAttribute().getJavaType();
          if (metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType()))
          {
              return fromBytes(b, String.class);
          }
          return fromBytes(b, idFieldClass);
      }
docs: From bytes.
  
  @param m
  the m
  @param metaModel
  the meta model
  @param b
  the b
  @return the object