HHH-7732 QueryTest#testMemberOfSyntax failing on Oracle

This commit is contained in:
brmeyer 2012-10-29 13:46:47 -04:00
parent 5293c78d52
commit cdc8d4331c
2 changed files with 14 additions and 4 deletions

View File

@ -23,16 +23,23 @@
*/
package org.hibernate.test.annotations.collectionelement;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Table;
/**
* @author Steve Ebersole
* @author Brett Meyer
*/
@Entity
// HHH-7732 -- "EntityWithAnElementCollection" is too long for Oracle.
@Table( name = "EWAEC" )
public class EntityWithAnElementCollection {
private Long id;
private Set<String> someStrings = new HashSet<String>();
@ -47,6 +54,10 @@ public class EntityWithAnElementCollection {
}
@ElementCollection
// HHH-7732 -- "EntityWithAnElementCollection_someStrings" is too long for Oracle.
@JoinTable(
name = "SomeStrings",
joinColumns = @JoinColumn( name = "EWAEC_ID") )
public Set<String> getSomeStrings() {
return someStrings;
}

View File

@ -44,7 +44,6 @@ public class QueryTest extends BaseCoreFunctionalTestCase {
public void testMemberOfSyntax() {
// performs syntax checking of the MEMBER OF predicate against a basic collection
Session s = openSession();
// s.createQuery( "from EntityWithAnElementCollection e where 'abc' in elements( e.someStrings )" ).list();
s.createQuery( "from EntityWithAnElementCollection e where 'abc' member of e.someStrings" ).list();
s.close();
}