Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » [JPA] generate tables from entities on HSQL
icon1.gif  [JPA] generate tables from entities on HSQL [message #631437] Thu, 07 October 2010 14:39 Go to next message
El Arbi Aboussoror is currently offline El Arbi AboussororFriend
Messages: 90
Registered: June 2010
Member
Hi,

I have a JPA project and we the right click I've launched "Generate tables from Entities" but nothing is created in the database. May be I have a property setting missing in my persistence.xml file.

This is my persistence.xml :

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
	xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
	<persistence-unit name="aircraftPU">
		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
		<jta-data-source>aircraftDS</jta-data-source>

		<properties>
			<property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:hsql://localhost/aircraftdb" />
 
        <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
        <property name="create-tables" value="true"/>
        <property name="javax.persistence.jdbc.user" value="sa"/>
        <property name="javax.persistence.jdbc.password" value=""/>

		</properties>
	</persistence-unit>
</persistence>


thanks
Re: [JPA] generate tables from entities on HSQL [message #631494 is a reply to message #631437] Thu, 07 October 2010 17:28 Go to previous message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
I'm afraid you have the wrong forum. This is the Gemini forum, but I think you were wanting to post to the EclipseLink forum?

In any case, if you want the EclipseLink runtime to generate the tables then you can add the following property to your persistence.xml:

<property name="eclipselink.ddl-generation" value="create-tables"/>

You can read more about the DDL generation features and the available options here.

Good luck,

-Mike
Previous Topic:Gemini Naming Milestone Released
Next Topic:osgi.extender fails to inspect some bundles
Goto Forum:
  


Current Time: Thu Apr 25 08:20:38 GMT 2024

Powered by FUDForum. Page generated in 0.02569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top