Jean-Francois Leveque

Refactoring des comptes vers dénomination Account : import.sql (non détecté par IDEA, oubli)

......@@ -173,6 +173,14 @@
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<!--
<version>5.1.6</version>
-->
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
......
......@@ -10,7 +10,7 @@ public class JpaConfiguration {
@Produces
@RequestScoped
@PersistenceContext(unitName = "book-pu")
@PersistenceContext(unitName = "v3-pu")
public EntityManager entityManager;
}
......
......@@ -17,4 +17,18 @@
</properties>
</persistence-unit>
<persistence-unit name="v3-pu" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>v3Database</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.hbm2ddl.import_files" value="import.sql"/>
<property name="hibernate.hbm2ddl.import_files_sql_extractor" value="org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor" />
<!-- DDL control OFF
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
-->
</properties>
</persistence-unit>
</persistence>
\ No newline at end of file
......
......@@ -85,10 +85,10 @@ INSERT INTO AccountProperty (userPropertyId, name, tag, visible) VALUES
(4, 'taille_listes', 'Nombre d''éléments affichés dans les listes', TRUE),
(5,'skin', 'Thème visuel', TRUE);
INSERT INTO Person_AccountRole VALUES (1,2);
INSERT INTO Person_AccountRole VALUES (2,2);
INSERT INTO Person_AccountRole VALUES (3,2);
INSERT INTO Person_AccountRole VALUES (4,2);
INSERT INTO Person_AccountRole VALUES (5,2);
INSERT INTO Person_AccountRole VALUES (6,2);
INSERT INTO Person_AccountRole VALUES (5,4);
\ No newline at end of file
INSERT INTO Account_AccountRole VALUES (1,2);
INSERT INTO Account_AccountRole VALUES (2,2);
INSERT INTO Account_AccountRole VALUES (3,2);
INSERT INTO Account_AccountRole VALUES (4,2);
INSERT INTO Account_AccountRole VALUES (5,2);
INSERT INTO Account_AccountRole VALUES (6,2);
INSERT INTO Account_AccountRole VALUES (5,4);
\ No newline at end of file
......
......@@ -6,4 +6,11 @@
UserName = sa
JtaManaged= true
</Resource>
<Resource id="v3Database" type="javax.sql.DataSource">
JdbcDriver = com.mysql.jdbc.Driver
JdbcUrl = jdbc:mysql://localhost/v2?useSSL=false
UserName = grogdev
password = grogdev
JtaManaged= true
</Resource>
</tomee>
\ No newline at end of file
......