ID Keyword
The ID statement defines the unique identifier for that type. By default 3DSpace uses object identification numbers (OIDs) for everything in the database, so each object that will be represented in 3DSpace from the foreign database must also have an OID. 3DSpace will generate an OID and store it persistently in the database, as long as the persistentforeignids
system setting is true (the default).
The ID is ideally an integer column, and the integer must be between 0 and 16777215.
However, if you do not have an integer column for an object type or the integers go beyond the acceptable range, you can use the mapped
keyword after the ID column specification for a type. For example:
type EMPLOYEE { id EMP(EMPNAME) mapped; ... } |
Objects of one type can be scattered among multiple tables. Even so, all mapped objects of one type must have a common ID column, either real or created through a join.
If you used ROWID
in a table description, these columns must be mapped when referenced in a TYPE
description. For example:
type Department { id DEPT(ROWID) mapped; ... }