If an auto field is of type
range then any
newly generated field will use the biggest non-used number in the
Consider the toys stockage database introduced above. We could
declare that the
Id field must be generated automatically:
%rec: Item %key: Id %type: Id int %mandatory: Description %auto: Id Id: 0 Description: 2cm metal soldier WWII Amount: 2111
Next time a new item is introduced in the database, the conforming
application will note the
%auto, and will create a new
Id field for the new record with the bigger unused integer
Id is declared to be of type
this example, the new record will have an Id of
application can still provide an explicit Id for the new record. In
that case the field is not generated automatically.
Note that if no explicit type is defined for an auto generated field then it is assumed to be an integer.