test
This commit is contained in:
BIN
persistence/.DS_Store
vendored
Normal file
BIN
persistence/.DS_Store
vendored
Normal file
Binary file not shown.
21
persistence/GalleryImage.hbm.xml
Normal file
21
persistence/GalleryImage.hbm.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!DOCTYPE hibernate-mapping SYSTEM "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<hibernate-mapping package="org.openxava.session">
|
||||
|
||||
<class
|
||||
name="GalleryImage"
|
||||
table="IMAGES">
|
||||
|
||||
<id name="oid" column="ID" access="field">
|
||||
<generator class="uuid"/>
|
||||
</id>
|
||||
|
||||
<property name="galleryOid" column="GALLERY"/>
|
||||
<property name="image" column="IMAGE" length="16777216"/>
|
||||
|
||||
</class>
|
||||
|
||||
</hibernate-mapping>
|
||||
|
||||
48
persistence/META-INF/persistence.xml
Normal file
48
persistence/META-INF/persistence.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<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_1_0.xsd"
|
||||
version="1.0">
|
||||
|
||||
<persistence-unit name="default">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<non-jta-data-source>java://comp/env/jdbc/BabydatenbankDS</non-jta-data-source>
|
||||
<class>org.openxava.session.GalleryImage</class>
|
||||
<class>org.openxava.web.editors.DiscussionComment</class>
|
||||
<properties>
|
||||
<property name="javax.persistence.schema-generation.database.action" value="update"/>
|
||||
<property name="javax.persistence.create-database-schemas" value="true"/>
|
||||
<property name="hibernate.default_schema" value="Babydatenbank"/>
|
||||
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
<!-- MySQL
|
||||
<persistence-unit name="default">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<non-jta-data-source>java://comp/env/jdbc/BabydatenbankDS</non-jta-data-source>
|
||||
<class>org.openxava.session.GalleryImage</class>
|
||||
<class>org.openxava.web.editors.DiscussionComment</class>
|
||||
<properties>
|
||||
<property name="javax.persistence.schema-generation.database.action" value="update"/>
|
||||
<property name="javax.persistence.create-database-schemas" value="true"/>
|
||||
<property name="hibernate.default_catalog" value="Babydatenbank"/>
|
||||
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
-->
|
||||
|
||||
<!-- JUnit Hypersonic -->
|
||||
<persistence-unit name="junit">
|
||||
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
||||
<class>org.openxava.web.editors.DiscussionComment</class>
|
||||
<properties>
|
||||
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
|
||||
<property name="hibernate.default_schema" value="Babydatenbank"/>
|
||||
<property name="hibernate.connection.url" value="jdbc:hsqldb:hsql://localhost:1666"/>
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
</persistence>
|
||||
20
persistence/hibernate.cfg.xml
Normal file
20
persistence/hibernate.cfg.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD//EN"
|
||||
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<!--
|
||||
This hibernate configuration is used only for IMAGES_GALLERY stereotype,
|
||||
because this stereotype is implemented using hibernate native APIs.
|
||||
If you do not use IMAGE_GALLERY you do not need this file.
|
||||
|
||||
The datasource configured here is the datasource in where the images will be
|
||||
store, and usually match wiht the main datasource of application defined in
|
||||
persistence.xml.
|
||||
-->
|
||||
|
||||
<hibernate-configuration>
|
||||
|
||||
<session-factory>
|
||||
|
||||
<property name="hibernate.connection.datasource">java://comp/env/jdbc/BabydatenbankDS</property>
|
||||
<property name="hibernate.jdbc.use_get_generated_keys">false</property>
|
||||
Reference in New Issue
Block a user