code: private Row createRow(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders)
      {
          String schema = entityMetadata.getSchema(); // Irrelevant for this
          // datastore
          String table = entityMetadata.getTableName();
  
          MetamodelImpl metamodel = (MetamodelImpl) KunderaMetadataManager.getMetamodel(kunderaMetadata,
                  entityMetadata.getPersistenceUnit());
  
          Table schemaTable = null;
  
          try
          {
              schemaTable = tableAPI.getTable(table);
  
              if (schemaTable == null)
              {
                  log.error("No table found for " + table);
                  throw new KunderaException("No table found for " + table);
              }
          }
          catch (FaultException ex)
          {
              log.error("Error while getting table " + table + ". Caused By: ", ex);
              throw new KunderaException("Error while getting table " + table + ". Caused By: ", ex);
          }
  
          Row row = schemaTable.createRow();
  
          if (log.isDebugEnabled())
          {
              log.debug("Persisting data into " + schema + "." + table + " for " + id);
          }
  
          EntityType entityType = metamodel.entity(entityMetadata.getEntityClazz());
  
          Set<Attribute> attributes = entityType.getAttributes();
  
          // process entity attributes.
          process(entity, metamodel, row, attributes, schemaTable, entityMetadata);
          // on relational attributes.
          onRelationalAttributes(rlHolders, row, schemaTable);
          // add discriminator column(if present)
          addDiscriminatorColumn(row, entityType, schemaTable);
          return row;
      }
docs: Creates the row.
  
  @param entityMetadata
  the entity metadata
  @param entity
  the entity
  @param id
  the id
  @param rlHolders
  the rl holders
  @return the row