Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] specify storage engine?

Andreas,
Hi, this sounds like a good enhancement request. For now I would think the only way to change the underlying engine is to restart MySQL after switching to InnoDB from MyISAM and rerun the DDL generation on the first predeploy - making sure that all tables and sequences are dropped. I would have to verify this though on V4 or 5 before it would be helpful.

Here is an example of an SE persistence unit with generic drop and create DDL generation on for Derby in conjunction with sequence generation on all @Id's - for reference only <persistence-unit name="dao.create.tables.derby.client" transaction-type="RESOURCE_LOCAL">
       <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
       <exclude-unlisted-classes>false</exclude-unlisted-classes>
       <properties>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/> <property name="eclipselink.target-database" value="Derby"/> <property name="javax.persistence.jdbc.url" value="jdbc:derby://127.0.0.1:1527/weblogic;create=true"/>
           <property name="javax.persistence.jdbc.user" value="APP"/>
           <property name="javax.persistence.jdbc.password" value="APP"/>
<property name="eclipselink.logging.level" value="ALL"/> <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/> <property name="eclipselink.ddl-generation.output-mode" value="database"/> <!-- or "both" for sql output as well-->
       </properties>
</persistence-unit> See
http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.common.ddlgen/src/META-INF/persistence.xml
http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/examples/org.eclipse.persistence.example.jpa.server.common.ddlgen/src/org/eclipse/persistence/example/jpa/server/business/Cell.java

   thank you
   /michael


Andreas Kollegger wrote:
Is there a configuration property in persistence.xml that can be used to change the storage engine used for generated tables? For instance, innodb instead of MyISAM.

Thanks,
Andreas

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top