# Update the Project Data Model

# Overview

This tutorial explains how to use the Entando Component Generator powered by JHipster (opens new window) to quickly update the data model for your Entando project.

# Prerequisites

A Blueprint-generated project

# Tutorial

The steps below assume you're working out of the root directory of the microservice, e.g. /microservices/conference-ms.

  1. Use JHipster to extract the current application description. The resulting JHipster Domain Language (JDL) file contains your project's application configuration and entity definitions:
ent jhipster export-jdl export.jdl
  1. To strip unnecessary information, create a new JDL file comprising only the elements that describe entities. If you followed the bundle project generation tutorial, that could be as simple as creating a file named conference.jdl that contains the following:
entity Conference {
  name String
}
  1. Enhance this definition by adding fields, entities, table mappings, field validation, etc. This is easily accomplished with the online JDL-Studio or corresponding JHipster IDE plugins/extensions (opens new window). For example:
entity Conference {
  name String required
  location String
  date ZonedDateTime
}

entity Session {
  name String required
  track Track required
}

enum Track {
  BUSINESS, TECHNICAL
}

relationship OneToMany {
   Conference to Session
}

This file content adds two fields to the Conference entity, introduces the Session entity plus an enum, and creates a mapping between the two entities. Below is the updated data model in JDL-Studio:

conference.jdl

  1. Import the JDL file into your application. You will be prompted with the option to generate MFEs if this was requested during project generation.
ent jhipster import-jdl conference.jdl

If the default project structure has been retained, this step will update your data model, add entries to Liquibase to upgrade database schema during deployment, add service methods to your microservice, add fields to your MFEs, etc.

  1. You can now build your updated project and run it locally or deploy it to Entando. Definition enhancement through build and test can be repeated as many times as needed.