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 a开发者_如何学编程nybody have idea about this? Or is there any other way to generate entities in eclipse?
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:
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":
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:
Happy Mapping!
精彩评论