Database > Entity Import (Create JPA Entities)
If you are building your application on top of an existing database, you can use RapidClipse’s import function to generate all required entities and their DAOs. Based on the imported database metadata, including tables, relations, and other constraints, the Java code for the corresponding entities is generated.
Hibernate data type mapping
The data types used by databases are often very different from corresponding data types in Java, among other things in the designation, structure and value range. During import, all database data types are automatically converted into suitable Java data types (data-type mapping). If certain relations were not or not correctly defined in the database, these must be completed or corrected during the import process.
-
In Project Management > main-java click on. *Create JPA entities from tables.
-
Click Tables to select all database tables and then click Next >.
-
Check the imported constraints.+.
-
Click on the relation you want to check more closely or change if necessary. In the lower detail area you can make any necessary changes.
-
Click Next >.
-
Specify the target folders or packages into which the code for your entities and their associated DAOs should be generated.
-
Click Finish > to start the database metadata import and have the entity model generated.
-
Select the project name of your project in Project Management, which will display the entities and their associated DAO.
|