Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to generate JPA entities from HSQLDB

I am using OpenJPA and HSQLDB for my current project.

But I am unable to generate JPA entities from the HSQLDB because eclipse plugin is not giving me an option to select the schema.

Does anybody have idea about this? Or is there any other way to generate entities in eclipse?

like image 456
Satya Avatar asked Dec 29 '22 02:12

Satya


1 Answers

I am assuming that you are using the "standard" JPA tooling (JPT), since you are not specifying otherwise.

First, you need to define a connection (in the Data Source Exlporer). You should be able to drill down and see the actual tables you need to work with:

alt text

You select the schema on the "JPA Facet" page when you create the JPA project or activate the JPA Facet: There is a checkbox called "Override default schema from connection", and a combo-box where you select the "Schema":

Screen shot of the JPA Facet property page

You can even select the schema when you ask to generate entities (right click on the project, JPA Tools > Generate Entities from Tables...), and then you get this dialog: Dialog where you can select a different schema

Happy Mapping!

like image 107
JesperSM Avatar answered Jan 04 '23 17:01

JesperSM