Figures 1 and 2 show the relationship between customers "Jasmine Soft" and "Jasmine Shoji" (Foreign key relationshipThe definition is done.
Opens the search screen of the "customer" model (child).The company name is a reference linkage item, and it is not prepared (as a database definition) in the table of the customer model.You can combine with "company" model (which is parent) to perform a search.
In this example, we define the "company" model as the parent and the "customer" model as the child.
We will save the "company name" item in the database.(When you define an item, it will be saved in the database by default.)
"Company ID" is a foreign key.Prepare "company name" as reference linking item of company ID.
Specify the primary key of the company model as a foreign key.
We refer to the company name (company model) with reference to the company ID (of the customer model) as a trigger.
We do not save this item in the database.As a result, this company name field is no longer included in the table definition corresponding to the company model.
The conditional expression is blank as standard.When using the reference linkage item as the search condition, it becomes an exact match search.
If you select "Partial match of character string", it becomes partial match search.(The operation shown in the above example is when this setting is made.)
By enabling range search, you can set search conditions by range.
Referenced itemBe sure to "Save to database".(In the example above, "company name" of "company model" must be set to save in the database.)
The following specifications can not be performed.
When using the built-in database (HSQLDB), it does not work if the item name (English) in the model of the referenced item overlaps with the item name (English) in the model of the referring source item.
Example: If the primary key name of each model is the same (eg id), an error occurs in the built-in database.To use this function, change the primary key name for each model or use an external database.