Events triggered when the ADF creates EO

Source: Internet
Author: User

When an entity object is created from an existing table in the database in the ADF, the following occurs:

1,
The property name conversion is completed. For example, Java will convert the property names such as manager_id in the database to managerid, that is, the conversion is based on the corresponding rules, most of which are to remove the underline ("_")

2,
Converts the Data Types of each column in SQL and Java. It is worth noting that varchar is converted to string.

3,
Converts or maps the length and precision of each attribute in the database.

4,
Converts or maps the primary key and uniqueness.

5,
Converts or maps mandatory attributes and other constraints.

6,
Converts or maps relations between entities based on foreign key relationships.

(In the ADF, XML is used to record the correspondence between the object and the data object in the database)

Supplement:

(1)
If the table has a primary foreign key relationship, the relationship is generated under the entities package at the same time as the entity is generated. A special package is created under the entity package to place the relationship.

(2)
Because an object contains at least one attribute as its primary key, if the data object in the database does not have a primary key, when it is mapped to an object, it cannot be inferred which attribute should be the primary key. In this case, jdeveloper automatically creates a column named rowid to correspond to the rowid in the data table and uses this attribute as the primary key of the object. You can manually modify the rowid attribute later, delete the rowid attribute, and set other attributes as the primary key.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.