Friday, April 6, 2018

Eclipse generate JPA entities from DB

Unfortunately there doesn't seem to exist a tool to generate JPA Entities directly from SQL. Weird!
So you have to start by populating a real schema.

Create a Java project

Configure "Targeted Runtimes" with "Wildfly 11 Runtime"

Configure Project, Facets, and select JPA (ignore the "further configuration available")

Right-click on Project, you should see "JPA Tools", "Generate Entities from tables"



When I was young I was thinking of 2017 as the age of teletransportation and instant cure for all diseases. Instead it's the age of wasting hours for a Maven configuration. I bet the Cro-Magnon were more technologically savvy than the Maven folks.




No comments: