I had a working project in eclipse which created a JPA table from entity to mysql database (still learning). Unfortunately it made the table in the wrong database as I wanted there to be test and production databases. Somehow it got the details for the production db, even that it looked like the selected database connection was for the test. I tampered with the project a bit and made it to connect with right connection object for certain (test). I can ping the db in eclipse (both dbs) and see the db in the Data Source Explorer. But now I can not create the table(s) for the project by right clicking on it and selecting JPA Tools > Generate Tables from Entities . The creation starts and finishes with no errors, like everything works, yet I see no tables in either of the databases. (In eclipse Database explorer or from command line). The persistence.xml should be fine as it already created that one table before.
唯一的错误是对实体类的错误,正如对实体注解中所说的“表XXX 无法解决 ” 。 正如我所看到的,它来自表格,没有创建。
Here s the persistence.xml just in case. http://pastebin.com/djPZei90
该项目也是马文项目,它使用SVN。 月食/项目依赖区成功地由月食/项目修道院装载,与SVN没有并发症。
由于 Maven, 有 2 个持久性. xml 文件( 只有登录证书和数据库名称更改) 用于生产和测试。 可能是 db 连接在第一处被检查并装入错误的文件 。 (只是猜测)
我还试图在生成表格时创建脚本. sql。 我找到了文件, 但它是空的 。
Anyway the problem is now that I can t create the tables anywhere. I am totally puzzled by this. Any hints where I should look to fix this?