Chapter 27. Export and Import

  1. Home
  2. Docs
  3. Chapter 27. Export and Import
  4. 5. Command-line Interface
  5. Generating ORM code and/or database with command

Generating ORM code and/or database with command

Download PDF

Generation of ORM code and database can be done through the command line interface. To do this:

  1. Browse the scripts folder under the Visual Paradigm installation directory. For Mac users, you can find the scripts folder in the Visual Paradigm package by right clicking on it and then selecting Show Package Contents. Then look in Contents\Resources\app\scripts for the scripts folder.
  2. Start the command prompt.
  3. Navigate to the bin folder of Visual Paradigm installation directory.
  4. Execute the script by supplying the required parameters. For example:
    GenerateORM -project C:\Demo\Demo.vpp -out C:\Demo\Output -code -ddl

    Parameter Description Example
    -project Project path C:\Demo\Demo.vpp
    -out Folder for storing the generated files including the source code, required libraries and mapping XML C:\Demo\Output
    -db [optional] The type of database management system of the target database. When specifying this option, please enter the number of the corresponding database listed below.
    1: MySQL
    2: MySQL 5.0.5
    3: MariaDB
    4: MS SQL Server
    5: MS SQL Server 2008
    6: Oracle
    7: HSQL
    8: Sybase ASE
    9: Sybase SQL Anywhere
    10: PostgreSQL
    11: Cloudscape/Derby
    12: Derby 10.7
    13: DB2
    14: Ingres
    15: Ingres 10
    16: OpenEdge
    17: Informix
    18: Firebird
    19: FrontBase
    20: OpenBase
    21: Cache
    22: SQLite
    23: H2
    24: Redshift
    -code [optional] Include to generate code. -code
    -ddl [optional] Include to export DDL -ddl
    -exportdb [optional] Include to export database -exportdb
    -dbmode [optional] The action that you want to execute upon your database. Here is a list of possible actions:
    – Create
    – Update
    – DropAndCreate
    – Drop

Note: If you are unable to get the execute success, try to open the project with Visual Paradigm, run once and save. The problem is likely to occur when some files required (e.g. dialet) are unknown due to never been defined in the project file.