Skip to content

Instantly share code, notes, and snippets.

@etissieres
Created June 17, 2013 12:51
Show Gist options
  • Save etissieres/5796622 to your computer and use it in GitHub Desktop.
Save etissieres/5796622 to your computer and use it in GitHub Desktop.
SQLite persistence.xml
<persistence 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_2_0.xsd"
version="2.0">
<persistence-unit name="sample">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.sample.entities.Entity</class>
<properties>
<property name="dialect" value="org.hibernate.dialect.SQLiteDialect" />
<property name="javax.persistence.jdbc.driver" value="org.sqlite.JDBC" />
<property name="javax.persistence.jdbc.url" value="jdbc:sqlite::memory:" />
<property name="javax.persistence.jdbc.user" value="" />
<property name="javax.persistence.jdbc.password" value="" />
<property name="hibernate.show_sql" value="true" />
<property name="format_sql" value="true" />
<property name="hibernate.connection.charSet" value="UTF-8" />
<property name="hibernate.hbm2ddl.auto" value="create" />
</properties>
</persistence-unit>
</persistence>
@deltanart
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment