I will explain How to write a repository of Wagby's "model".


It is a unit of data handled by Wagby.In this tutorial we will deal with "customer model".

"Model" corresponds to "table" in relational database.

Model item

It refers to items included in the model.For example, there are "name" "address" "telephone number".

"Model item" corresponds to "column" in the relational database.

Model reference

It refers to "relationship" between model and model.For example, a relationship between "customer" model and "product" model is assumed that "(one customer) purchases product (s)".At this time, the customer model refers to the product model.

"Model reference" corresponds to "relation" in a relational database.

Option model

Items of "primary key", "content", "display priority", and "expiration date" are predefined models (templates; as templates) as model items.

"Choice model" was what we called Wagby R6 as the master model.

Let's prepare a "choice model" for the previously built Web application (customer management system).We assume the item "Industry" here.

Item name (Japanese) Item name (English) Item type Reference model
Industry job Model reference
(list box)
Figure 1 Creating a Choice Model
As for the template function, we use a template of a model prepared in advance.The explanation of other templates is described in the manual, so we will omit it here.

In the option model, four items "primary key" "contents" "display priority" "expiration date" are predefined as standard.
(You can not change the name, ID and type of these items.)

Figure 2 Standard form of choice model

Here, we will set the model name to "industry type" and model ID "jobtype_m".
("_ M" included the meaning that this model is an option, but it does not necessarily have to be such a name.)

Figure 3 Setting the model name and model ID

The choice model can set the initial value specially.When the "Initial data" tab is pushed, the input screen of Fig. 4 opens.

Figure 4 Setting initial values ​​of choices

By pressing "Add" button, you can set multiple initial values.Double clicking on the content column will enable input.

Figure 5 Setting the initial value of the "content" item

The setting of industry type (option model) is over.Press "Model" from the menu and return to the model list display screen.

Figure 6 Return to model list display

Next, open the editing screen of the customer model prepared earlier.

Figure 7 Editing the customer model screen

Add one model item.Select "New" from the gear icon submenu.

Figure 8 Adding model items

The item name is "Industry Type".The item ID is "job".The type specifies "reference item of another model".

Figure 9 Setting Information of Industry Model Item

If you select "Refer to item of another model" as type, Figure 10 "Model item type detailed setting" dialog is displayed.

Figure 10 Model Item Type Advanced Settings

As reference model, select the "industry type" model prepared in Figure 1.

Figure 11 Designation of Reference Model

Specify the input type as "list box".In the referenced model item, "content" is specified.

Figure 12 Specifying the input type and referenced model item

Check the options.In the display priority item, "display priority" prepared on the side of the choice model side is associated with "invalid judgment item" is "valid term" respectively.(In case of choice model, this setting is done automatically.)
The model coordination setting is complete with this.

Figure 13 Specification of display priority items and invalidity judgment items

Industry category items are subject to search and subject to list display.

Figure 14 Setting search and list display

Build.Move from the menu to the build screen and press the build button.

Figure 15 Building

The build is over.

Figure 16 Build complete

Open the customer search screen from the service menu and press the new registration button from there to make a transition to the new registration screen.As shown in Figure 18, the "Industry Type" item has been added, and you can see that the initial data has been loaded.

Figure 17 "Business type" item added

Figure 18 shows the details display screen after data registration.

Figure 18 Details screen

Before proceeding to the next step, save the current data. Select "Import and export" from the management processing menu.

Figure 19 Management Process Menu

Click the "Select All" button and set the check flag for all models.In this state, press the "Export" button.

Figure 20 Exporting All Models

The current data has been saved.The save folder name is given the year, month, and date at the time of implementation.

Figure 21 Export succeeded

Finally log off from the application.Proceed to the next tutorial.

Figure 22 Logoff

You can add options during operation.You can also change the display order or temporarily disable it.

For details, please read "Repository> Reference to other models> Option model".

Please read "Frequently Asked Questions and Answers> Tutorial".