When an entity object is established in the ADF by a table that already exists in the database, it occurs:
1, the completion of the conversion of property names, for example: Java will be the database name such as manager_id property name conversion into ManagerID, that is, according to the corresponding rules for conversion, more is to remove the underscore ("_")
2, complete the SQL and Java in the column data types of conversion, it is noteworthy that varchar conversion into a string
3, the completion of the database of the attributes of the length and accuracy of the conversion or mapping
4, the completion of the primary key and uniqueness of the transformation or mapping
5, the completion of mandatory constraints on the attributes and other constraints of the conversion or mapping
6, according to the foreign key relationship between the completion of the transformation of the relationship between entities or mapping
(In the ADF, XML is actually used to record the correspondence between the entity object and the data object in the database)
Add:
(1) If there is a primary foreign key relationship in the table, the relationship between the generated entities will be generated at the same time under the entities package, typically under the entity package to create a new special package to place the relationship
(2) Because an entity object contains at least one property as its primary key, if the data object in the database does not have a primary key, and the mapping becomes an entity object, it is not possible to infer which attribute should be the primary key, in which case JDeveloper automatically creates a column named rowID. To correspond to the ROWID in the datasheet and use this property as the primary key for the entity object. We can then manually make modifications, delete the rowID property, and set other properties as the primary key.