Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to generate tables from entities in Idea 13?

 
Jhonny Lora
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im giving idea a try and cant find the option JPA>Generate table from entities. I come from the eclipse world where I can generate entities or script with a couple of clicks and I find this is harder to do in intellij.

This is the persistence.xml I'm using:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="hmdb" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/name"/>
<property name="javax.persistence.jdbc.user" value="appsetup"/>
<property name="javax.persistence.jdbc.password" value="--------"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="sql-script"/>
<property name="eclipselink.application-location" value="/home/-------/Projects/-------/target" />
<property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql" />
</properties>
</persistence-unit>
</persistence>

The location Im using to generate the files is the idea build dir. Isn't there a way to generate using the eclipselink that you download from the eclipselink page as a zip?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic