Generating code and database
- Select Tools > Object-Relational Mapping (ORM) > Generate Code... from the main menu.

|
Generate code
|
- Fill in the Output Path and select code generation options.

|
Database code generation
|
- Error Handling:
- Return false/null - query method error return null, save/update/delete error return false.
- Throw PersistentException - throw PersistentException when error occurs.
- Throw RuntimeException - throw RuntimeException when error occurs.
- Throw User Defined Exception - throw the exception specified in User Defined Exception field when error occurs.
- Exception Handling:
- Do not Show - do nothing when exception throw.
- Print to Error Stream - print the exception to System.err.
- Print to log4j - log the exception to log4j.
- Click OK button to start code generation.