JPA EntityManager and JavaFx [duplicate]

一世执手 提交于 2019-12-12 10:24:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!