问题
I tried to use EntityManager in a JavaFx application in NetBeans (my solution is connected to postgres), I proceeded as follows :
1) I created a Persistence Unit. 2) Then Added the Entity Classes from Database.
but I can't get it to work, I tried to ask for some help in another thread Entity Manager not working in JavaFX but can't get it work either, is there any clean and clear tutorial or lesson where I can find clearly how to use a EntityManager in a JavaFx Fxml Application
回答1:
Well ... how does your code look like? What is the problem?
In a JavaFX application without an application server you have to use JPA in RESOURCE_LOCAL mode. Some good info is at:
http://tomee.apache.org/jpa-concepts.html
回答2:
I resolved the problem, I had to add the Postgres Driver and fix some incompatible types I was using in the database
来源:https://stackoverflow.com/questions/16499344/jpa-entitymanager-and-javafx