GLOBAL SITES
 Home > CodeAuto > Macrobject CodeAuto Manual
CodeAuto Introduction
Import Schema from Database
Edit Data Schema
  Edit Table Property
  Edit Field Property
  Edit Relations Property
Synchronize and Merge Schema
Choose a Template for Code Generating

3.3    Edit Relations Property

You can edit relation property according to the requirements as follows:

In CodeAuto, a relation consists of two parts, parent-relation and child-relation. If table A relates to table B, the name of the relationship for table A corresponds to that for table B. For example, if it is called parent- relation for table A, then for table B, it is child-relation, and vice versa.

CodeAuto processes the parent-relation and child-relation separately and lists them out as in the above picture, so that it is convenient for users to browse and edit them.

In the picture, the input box next to each relational table is for naming the relation for tables. Each pair of names is corresponding to each other. With these names, you can refer to them directly during code generation. ("Set" will be added to the end of the name of a child-relation automatically).

Orders o = new Orders(om)

o.OrderDetailsSet ...      // Set is automatically added to the name of child-relation

OrderDetails od = new OrderDetails(om)

od.Orders ...        // You can access parent-relation object by referring to the name of parent-relation

 

Related Topics

Edit Data Schema