original_string: protected function _newId($primary)
      {
          if (!$primary || count((array)$primary) > 1) {
              return null;
          }
          $typeName = $this->getSchema()->getColumnType($primary[0]);
          $type = Type::build($typeName);
  
          return $type->newId();
      }
code: protected function _newId($primary)
      {
          if (!$primary || count((array)$primary) > 1) {
              return null;
          }
          $typeName = $this->getSchema()->getColumnType($primary[0]);
          $type = Type::build($typeName);
  
          return $type->newId();
      }
code_tokens: protected function _newId ( $ primary ) { if ( ! $ primary || count ( ( array ) $ primary ) > 1 ) { return null ; } $ typeName = $ this -> getSchema ( ) -> getColumnType ( $ primary [ 0 ] ) ; $ type = Type :: build ( $ typeName ) ; return $ type -> newId ( ) ; }
docstring: Generate a primary key value for a new record.
  
  By default, this uses the type system to generate a new primary key
  value if possible. You can override this method if you have specific requirements
  for id generation.
  
  Note: The ORM will not generate primary key values for composite primary keys.
  You can overwrite _newId() in your table class.
  
  @param array $primary The primary key columns to get a new ID for.
  @return null|string|array Either null or the primary key value or a list of primary key values.
docstring_tokens: Generate a primary key value for a new record .