/
Database > Entity Import (Create JPA Entities)

Database > Entity Import (Create JPA Entities)

When you base a new application on an existing database, you can generate all the required entities with the respective DAO via the import function of RapidClipse. The Java code is generated for the corresponding entities based on the imported metadata in the tables, relations, and other constrains, among others.   

Hibernate data type mapping

The data types used by databases are often significantly different from the corresponding data types in Java, mainly in the name, structure, and value range. During import, all the database data types are automatically converted to suitable Java data types (data type mapping). If certain relations have not been defined or were not defined clearly in the database, this must be completed or corrected during the import. 


  1. In the Project Management > Entities click on Create JPA entities from tables.
  2. Click on Tables to select all the database tables. Then click on Next >.



  3. Check the imported constraints. 



  4. Click on the relation that you want to check in detail or change, if required. You can make any changes that are necessary in the bottom detail area.



  5. Click on Next>.
  6. Enter the target folder or packages in which the code for your entities and the respective DAO should be generated. 



  7. Click on Finish  to initiate the database-metadata-import and to generate the entity model.



  8. Select the name of your project in the Project Management area in which the entities and respective DAO are displayed.


Note:
  • Import complete database - It is recommended that you always import the entire database for the entity generation. When you generate only parts of your database entities, no relations can be created for entities that are generated later.
  • Documentation on the Hibernate data type mapping of RapidClipse - You will find extensive documentation for the data type mapping strategy employed by the databases supported by RapidClipse here:

Related content

Creating a Data Source
Creating a Data Source
More like this
JPA & Hibernate
JPA & Hibernate
More like this
Adding, Editing, and Deleting Attributes
Adding, Editing, and Deleting Attributes
More like this
Create Entity
More like this
Native SQL Strings
Native SQL Strings
Read with this
Entity > Database Export (Create tables)
Entity > Database Export (Create tables)
More like this

XDEV Software Corp. - One Embarcadero Center, San Francisco, CA 94111, US
Copyright © 2015. XDEV Software Corp. All rights reserved.