objectAutoIncrement extends ColumnOption with Product with Serializable
Specify that the default value for the column for a new row in the
table is provided by a sequence. Use of AutoIncrement does not
create an index on the column. If uniqueness needs to be
guaranteed then a PRIMARY KEY or UNIQUE constraint can be added on
the column.
For Derby databases this uses GENERATED BY DEFAULT AS IDENTITY.
The alternate setting GENERATED ALWAYS AS IDENTITY is not used as
it is not consistent with MySQL and PostgreSQL which permits the
application to explicitly specify the column's value. See
http://db.apache.org/derby/docs/10.4/ref/rrefsqlj37836.html .
For MySQL databases this uses the AUTO_INCREMENT attribute; see
http://dev.mysql.com/doc/refman/5.5/en/create-table.html and
http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html .
For PostgreSQL databases this replaces the SMALLINT data type with
SMALLSERIAL, INTEGER with SERIAL and BIGINT with BIGSERIAL; see
http://www.postgresql.org/docs/9.2/static/datatype-numeric.html#DATATYPE-SERIAL .
Support for SMALLSERIAL is only available in PostgreSQL 9.2 and
greater.
Linear Supertypes
Serializable, Serializable, Product, Equals, ColumnOption, AnyRef, Any
Specify that the default value for the column for a new row in the table is provided by a sequence. Use of AutoIncrement does not create an index on the column. If uniqueness needs to be guaranteed then a PRIMARY KEY or UNIQUE constraint can be added on the column.
For Derby databases this uses GENERATED BY DEFAULT AS IDENTITY. The alternate setting GENERATED ALWAYS AS IDENTITY is not used as it is not consistent with MySQL and PostgreSQL which permits the application to explicitly specify the column's value. See http://db.apache.org/derby/docs/10.4/ref/rrefsqlj37836.html .
For MySQL databases this uses the AUTO_INCREMENT attribute; see http://dev.mysql.com/doc/refman/5.5/en/create-table.html and http://dev.mysql.com/doc/refman/5.5/en/example-auto-increment.html .
For PostgreSQL databases this replaces the SMALLINT data type with SMALLSERIAL, INTEGER with SERIAL and BIGINT with BIGSERIAL; see http://www.postgresql.org/docs/9.2/static/datatype-numeric.html#DATATYPE-SERIAL . Support for SMALLSERIAL is only available in PostgreSQL 9.2 and greater.