HHH-5806 mapping static inner class causes hsqldb tests fails

This commit is contained in:
Strong Liu 2010-12-23 17:51:50 +08:00
parent db62fa7dbe
commit cc3830d18b
3 changed files with 31 additions and 7 deletions

View File

@ -574,7 +574,7 @@
<dependency> <dependency>
<groupId>org.hsqldb</groupId> <groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId> <artifactId>hsqldb</artifactId>
<version>2.0.0</version> <version>2.0.1-rc3</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -16,15 +16,21 @@ import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Table;
public class Classes { public class Classes {
@Embeddable @Embeddable
@Table(name="Edition")
public static class Edition<T> { public static class Edition<T> {
T name; T name;
} }
@Entity @Entity
@Table(name="Book")
public static class Book { public static class Book {
@Id @Id
@GeneratedValue(strategy=GenerationType.AUTO) @GeneratedValue(strategy=GenerationType.AUTO)
@ -35,12 +41,15 @@ public class Classes {
} }
@Entity @Entity
@Table(name="PopularBook")
public static class PopularBook { public static class PopularBook {
@Id @Id
@GeneratedValue(strategy=GenerationType.AUTO) @GeneratedValue(strategy=GenerationType.AUTO)
Long id; Long id;
@ElementCollection @ElementCollection
@JoinTable(name="PopularBook_Editions",joinColumns={@JoinColumn(name="PopularBook_id")})
Set<Edition<String>> editions = new HashSet<Edition<String>>(); Set<Edition<String>> editions = new HashSet<Edition<String>>();
} }
} }

View File

@ -13,13 +13,28 @@
# # # #
# Red Hat Author(s): Steve Ebersole # # Red Hat Author(s): Steve Ebersole #
################################################################################ ################################################################################
hibernate.dialect ${db.dialect} ## H2
hibernate.connection.driver_class ${jdbc.driver} hibernate.dialect org.hibernate.dialect.H2Dialect
hibernate.connection.url ${jdbc.url} hibernate.connection.driver_class org.h2.Driver
hibernate.connection.username ${jdbc.user} hibernate.connection.username sa
hibernate.connection.password ${jdbc.pass} hibernate.connection.password
hibernate.connection.isolation ${jdbc.isolation}
hibernate.connection.url jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1;MVCC=TRUE
## Oracle 10g
#hibernate.dialect org.hibernate.dialect.Oracle10gDialect
#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
#hibernate.connection.username stliu
#hibernate.connection.password stliu
#hibernate.connection.url jdbc:oracle:thin:@vmg05.mw.lab.eng.bos.redhat.com:1521:qaora10
## HypersonicSQL
hibernate.dialect org.hibernate.dialect.HSQLDialect
hibernate.connection.driver_class org.hsqldb.jdbcDriver
hibernate.connection.username sa
hibernate.connection.password
hibernate.connection.url jdbc:hsqldb:test
hibernate.connection.pool_size 5 hibernate.connection.pool_size 5