I will explain the specification about the model.

I will explain how to register and delete models using WagbyDesigner.

Create a model

Select "Model" from the WagbyDesigner menu.There are two tabs "user" and "system", but the model to be newly developed is stored in the "user" tab.

As shown in Figure 1, select "New model" from the gear icon.As shown in Figure 2, the definition screen for the new model opens.

Figure 1 Defining a new model
Figure 2 Definition screen of new model

Change model name

"Model name" is the name displayed on the screen (and menu).
"Model ID" is used as the database table name and the identifier in the generated source code.
You can not use Japanese (hiragana, katakana, Chinese numerals) for model ID.Please use alphanumeric characters.

Figure 3 Setting the model name and model ID

Changing the model name and model IDImmediately reflected in the repositoryIt will be.At the timing of the build, the source code is regenerated using the changed name.

Delete model

Display the model list from the "Model" menu.Check the model you want to delete.

Figure 4 Check the model you want to delete

Select "Delete" from the gear icon.

Figure 5 Selecting deletion processing

A confirmation dialog will be displayed. Click the "OK" button.

Figure 6 Delete confirmation dialog

The model has been deleted.

Figure 7 Model deleted
"Restoring the repositoryBy using the function you can also return the model to the repository before deleting it.

You can specify build target models individually.Please specify a checkbox in the Build column.All models are targeted for build in the standard.

Figure 8 Specifying the build target model
Developers should consider model dependencies.If you are referring to a model that is not targeted for build, a build error occurs.
This designation isDesign document output toolIt will also be reflected.Only the checked models are output as design documents.

A table (for relational database) corresponding to the model is generated.

More precisely, DDL (create table, drop table) for the database is automatically generated for the model definition.You can use this DDL to create and delete tables on the database.[More ...]

  • A single-character model ID can not be used.Model ID should be two characters or more.
  • Please start with an English character or "_ (underscore)".
  • Please specify English letters or "_ (underscore)", half-width numeric characters after the second letter.
  • It can not consist of "_ (underscore)" and half-width numerals only.
  • Characters that can not be used as XML names can not be specified.Therefore, you can not use half-width katakana, double-byte numerals, double-byte alphabetic characters, symbols.(For characters that can be used as XML namesAppendix Characters that can be usedPlease read.)
  • Reserved words can not be specified.(For reserved wordsAppendix reserved wordsPlease read.)
  • All defined model IDs are case-insensitive, please specify not to duplicate ignoring the underscore.
    For example, if you specify 'ab', 'Ab', 'a B', 'AB', 'a _ b', 'A _ b', 'a _ B' or 'A_B', they are considered to be duplicated and an error occurs.
  • It is not possible to create a model ID with "P" "C" "CP" "L" "LP" "ULP" added to the end of the model ID separately.
    For example, if a model ID "ab" is prepared, you can not define "abp" "abc" "abcp" "abl" "ablp" "abulp" as another model ID.
  • You can not specify the model ID provided on the "System" tab.
  • The model ID whose prefix begins with "jfc" is reserved for future use by the system.It can not be specified.
  • You can not specify the following model ID that Wagby internally uses.
    • hour_m
    • minute_m
    • movestep_m
    • jpermission_m
    • jprincipal
    • service
    • master
    • Model name ending with "_p" "_ c" "_ cp" "_ l" "_ lp" "_ ulp"

Change model ID

If there are other models referring to this model, a warning dialog will be displayed before the change.When OK is pressed, the model ID after substitution is substituted for all referenced models.(The items in the formula are also the same.)

Delete model

If there are other models referring to this model, a warning dialog will be displayed before deleting.If you refer to this model in the calculation formula (item in), it is included in the warning target.

If you press OK, the model will be deleted, but for other models indicated as affected, developers should manually correct them appropriately.

The model included in the "System" tab is used by Wagby's management function.This is called "system model".On the other hand, the one created by the developer is called "user model".

System model constraints

The system model has the following restrictions.

  • Do not change the model ID.
  • Do not delete the model.
  • Model items included in the model should not be changed, including ID and type.

The following models can expand model items.

You can not change the defined items.Specifically, you can not change the item name or change the type.
Model nameModel IDUse
group jgroup Used for group authority management.It is linked with account (juser).
account juser Logon account.
holiday jholiday (*1) Information on public holidays.It is reflected in the calendar view.
Notice jnews A model that can notify users.

Please use the model other than the one described here as it is (without changing it). In Wagby's version upgrade, the latest model is applied when applying the migration tool (models belonging to "system" other than the model above).

1 The change of jholiday is currently unsupported.

There is no theoretical limit.
By increasing the memory used by WagbyDesigner, you can build applications that contain many models.
Moreover, by increasing the memory used by the application built by Wagby, it is possible to operate a large-scale application.