Hibernate SVN: r18493 - in search/trunk/src/test/java/org/hibernate/search/test: engine and 3 other directories.
by hibernate-commits@lists.jboss.org
Author: sannegrinovero
Date: 2010-01-09 18:11:33 -0500 (Sat, 09 Jan 2010)
New Revision: 18493
Modified:
search/trunk/src/test/java/org/hibernate/search/test/embedded/Product.java
search/trunk/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java
search/trunk/src/test/java/org/hibernate/search/test/jgroups/master/JGroupsMasterTest.java
search/trunk/src/test/java/org/hibernate/search/test/jms/master/JMSMasterTest.java
search/trunk/src/test/java/org/hibernate/search/test/jms/master/TShirt.java
search/trunk/src/test/java/org/hibernate/search/test/jms/slave/TShirt.java
Log:
HSEARCH-439 : Merge fixes from JBAPP (v3_1_1_GA_CP) branch to trunk: 1(unit tests fail cos db2 doesn't allow primary key column nullable) 2(Test JMSMasterTest contains invalid SQL statement) 3(keywords 'size' on oracle cause two H-search test case fails 4(org.hibernate.search.test.engine.LazyCollectionsUpdatingTest fails on most DB by a NPE). And fixed new JGroups test accordingly.
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/Product.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/Product.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/Product.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -34,7 +34,6 @@
import javax.persistence.ManyToMany;
import javax.persistence.Column;
import javax.persistence.CascadeType;
-import javax.persistence.MapKeyColumn;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Field;
@@ -49,15 +48,19 @@
@Entity
@Indexed
public class Product {
+
@Id @GeneratedValue @DocumentId
private Integer id;
+
@Field(index= Index.TOKENIZED)
private String name;
+
@ManyToMany(cascade = CascadeType.REMOVE) //just to make the test easier, cascade doesn't really make any business sense
@IndexedEmbedded
private Set<Author> authors = new HashSet<Author>();
+
@ManyToMany(cascade = CascadeType.REMOVE) //just to make the test easier, cascade doesn't really make any business sense
- @MapKeyColumn(name="CUST_NAME")
+ @MapKey(columns = @Column(name="CUST_NAME",nullable=false) )
@IndexedEmbedded
private Map<String, Order> orders = new HashMap<String, Order>();
Modified: search/trunk/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/engine/LazyCollectionsUpdatingTest.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -51,7 +51,10 @@
FullTextSession fullTextSession = Search.getFullTextSession( sessions.openSession() );
try {
Transaction tx = fullTextSession.beginTransaction();
- BusStop busStop = (BusStop) fullTextSession.get( BusStop.class, 1L );
+ List list = fullTextSession.createCriteria( BusStop.class ).list();
+ assertNotNull( list );
+ assertEquals( 4, list.size() );
+ BusStop busStop = (BusStop) list.get( 1 );
busStop.setRoadName( "new road" );
tx.commit();
}
@@ -68,7 +71,10 @@
assertFindsByRoadName( "buonarroti" );
FullTextSession fullTextSession = Search.getFullTextSession( sessions.openSession() );
try {
- BusStop busStop = (BusStop) fullTextSession.get( BusStop.class, 1L );
+ List list = fullTextSession.createCriteria( BusStop.class ).list();
+ assertNotNull( list );
+ assertEquals( 4, list.size() );
+ BusStop busStop = (BusStop) list.get( 1 );
busStop.setRoadName( "new road" );
fullTextSession.flush();
}
Modified: search/trunk/src/test/java/org/hibernate/search/test/jgroups/master/JGroupsMasterTest.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/jgroups/master/JGroupsMasterTest.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/jgroups/master/JGroupsMasterTest.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -141,7 +141,7 @@
s.getTransaction().begin();
Statement statement = s.connection().createStatement();
statement.executeUpdate(
- "insert into TShirt_Master(id, logo, size) values( '1', 'JBoss balls', 'large')"
+ "insert into TShirt_Master(id, logo, size_) values( '1', 'JBoss balls', 'large')"
);
statement.close();
TShirt ts = ( TShirt ) s.get( TShirt.class, 1 );
Modified: search/trunk/src/test/java/org/hibernate/search/test/jms/master/JMSMasterTest.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/jms/master/JMSMasterTest.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/jms/master/JMSMasterTest.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -56,7 +56,7 @@
import org.hibernate.search.test.SearchTestCase;
/**
- * Tests that the Master node in a JMS cluster can propertly process messages placed onto the queue.
+ * Tests that the Master node in a JMS cluster can properly process messages placed onto the queue.
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik
@@ -158,18 +158,18 @@
}
/**
- * Create a test object without trigggering indexing. Use SQL directly.
+ * Create a test object without triggering indexing. Use SQL directly.
*
* @return a <code>TShirt</code> test object.
*
- * @throws SQLException in case the inset fails.
+ * @throws SQLException in case the insert fails.
*/
private TShirt createObjectWithSQL() throws SQLException {
Session s = openSession();
s.getTransaction().begin();
Statement statement = s.connection().createStatement();
statement.executeUpdate(
- "insert into TShirt_Master(id, logo, size) values( '1', 'JBoss balls', 'large')"
+ "insert into TShirt_Master(id, logo, size_) values( 1, 'JBoss balls', 'large')"
);
statement.close();
TShirt ts = ( TShirt ) s.get( TShirt.class, 1 );
Modified: search/trunk/src/test/java/org/hibernate/search/test/jms/master/TShirt.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/jms/master/TShirt.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/jms/master/TShirt.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -24,6 +24,7 @@
*/
package org.hibernate.search.test.jms.master;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@@ -45,6 +46,7 @@
private int id;
@Field(index= Index.TOKENIZED)
private String logo;
+ @Column(name="size_")
private String size;
public int getId() {
Modified: search/trunk/src/test/java/org/hibernate/search/test/jms/slave/TShirt.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/jms/slave/TShirt.java 2010-01-09 20:26:40 UTC (rev 18492)
+++ search/trunk/src/test/java/org/hibernate/search/test/jms/slave/TShirt.java 2010-01-09 23:11:33 UTC (rev 18493)
@@ -24,6 +24,7 @@
*/
package org.hibernate.search.test.jms.slave;
+import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
@@ -45,6 +46,7 @@
private int id;
@Field(index= Index.TOKENIZED)
private String logo;
+ @Column(name="size_")
private String size;
public int getId() {
14 years, 11 months
Hibernate SVN: r18492 - in core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria: expression and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-01-09 15:26:40 -0500 (Sat, 09 Jan 2010)
New Revision: 18492
Added:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullLiteralExpression.java
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java
Log:
HHH-4776 - Add a NullLiteralExpression for CriteriaBuilder#nullLiteral
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java 2010-01-09 20:17:47 UTC (rev 18491)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java 2010-01-09 20:26:40 UTC (rev 18492)
@@ -47,6 +47,7 @@
import org.hibernate.ejb.criteria.expression.CoalesceExpression;
import org.hibernate.ejb.criteria.expression.CompoundSelectionImpl;
import org.hibernate.ejb.criteria.expression.ConcatExpression;
+import org.hibernate.ejb.criteria.expression.NullLiteralExpression;
import org.hibernate.ejb.criteria.expression.ParameterExpressionImpl;
import org.hibernate.ejb.criteria.expression.LiteralExpression;
import org.hibernate.ejb.criteria.expression.NullifExpression;
@@ -84,7 +85,7 @@
import static org.hibernate.ejb.criteria.predicate.ComparisonPredicate.ComparisonOperator;
/**
- * TODO : javadoc
+ * Hibernate implementation of the JPA {@link CriteriaBuilder} contract.
*
* @author Steve Ebersole
*/
@@ -619,6 +620,9 @@
* {@inheritDoc}
*/
public <T> Expression<T> literal(T value) {
+ if ( value == null ) {
+ throw new IllegalArgumentException( "literal value cannot be null" );
+ }
return new LiteralExpression<T>( this, value );
}
@@ -626,7 +630,7 @@
* {@inheritDoc}
*/
public <T> Expression<T> nullLiteral(Class<T> resultClass) {
- return new LiteralExpression<T>( this, resultClass, null );
+ return new NullLiteralExpression<T>( this, resultClass );
}
Copied: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullLiteralExpression.java (from rev 18486, core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java)
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullLiteralExpression.java (rev 0)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/NullLiteralExpression.java 2010-01-09 20:26:40 UTC (rev 18492)
@@ -0,0 +1,53 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2010, Red Hat Inc. or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.ejb.criteria.expression;
+
+import java.io.Serializable;
+
+import org.hibernate.ejb.criteria.CriteriaBuilderImpl;
+import org.hibernate.ejb.criteria.CriteriaQueryCompiler;
+import org.hibernate.ejb.criteria.ParameterRegistry;
+
+/**
+ * Represents a <tt>NULL</tt>literal expression.
+ *
+ * @author Steve Ebersole
+ */
+public class NullLiteralExpression<T> extends ExpressionImpl<T> implements Serializable {
+ public NullLiteralExpression(CriteriaBuilderImpl criteriaBuilder, Class<T> type) {
+ super( criteriaBuilder, type );
+ }
+
+ public void registerParameters(ParameterRegistry registry) {
+ // nothing to do
+ }
+
+ public String render(CriteriaQueryCompiler.RenderingContext renderingContext) {
+ return "null";
+ }
+
+ public String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext) {
+ return render( renderingContext );
+ }
+}
\ No newline at end of file
14 years, 11 months
Hibernate SVN: r18491 - core/trunk/core/src/main/java/org/hibernate/hql/ast/tree.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-01-09 15:17:47 -0500 (Sat, 09 Jan 2010)
New Revision: 18491
Modified:
core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java
Log:
HHH-4743 - Bug in BooleanLiteralNode with CustomType
Modified: core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java 2010-01-09 20:17:01 UTC (rev 18490)
+++ core/trunk/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java 2010-01-09 20:17:47 UTC (rev 18491)
@@ -24,8 +24,8 @@
*/
package org.hibernate.hql.ast.tree;
+import org.hibernate.type.LiteralType;
import org.hibernate.type.Type;
-import org.hibernate.type.BooleanType;
import org.hibernate.Hibernate;
import org.hibernate.QueryException;
import org.hibernate.engine.SessionFactoryImplementor;
@@ -42,33 +42,37 @@
return expectedType == null ? Hibernate.BOOLEAN : expectedType;
}
- public BooleanType getTypeInternal() {
- return ( BooleanType ) getDataType();
- }
-
public Boolean getValue() {
return getType() == TRUE ? Boolean.TRUE : Boolean.FALSE;
}
/**
- * Expected-types really only pertinent here for boolean literals...
- *
- * @param expectedType
+ * {@inheritDoc}
*/
public void setExpectedType(Type expectedType) {
this.expectedType = expectedType;
}
+ /**
+ * {@inheritDoc}
+ */
public Type getExpectedType() {
return expectedType;
}
+ /**
+ * {@inheritDoc}
+ */
public String getRenderText(SessionFactoryImplementor sessionFactory) {
try {
- return getTypeInternal().objectToSQLString( getValue(), sessionFactory.getDialect() );
+ return typeAsLiteralType().objectToSQLString( getValue(), sessionFactory.getDialect() );
}
catch( Throwable t ) {
throw new QueryException( "Unable to render boolean literal value", t );
}
}
+
+ private LiteralType typeAsLiteralType() {
+ return (LiteralType) getDataType();
+ }
}
14 years, 11 months
Hibernate SVN: r18490 - core/branches/Branch_3_3/core/src/main/java/org/hibernate/hql/ast/tree.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-01-09 15:17:01 -0500 (Sat, 09 Jan 2010)
New Revision: 18490
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java
Log:
HHH-4743 - Bug in BooleanLiteralNode with CustomType
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java 2010-01-09 19:47:29 UTC (rev 18489)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/hql/ast/tree/BooleanLiteralNode.java 2010-01-09 20:17:01 UTC (rev 18490)
@@ -24,8 +24,8 @@
*/
package org.hibernate.hql.ast.tree;
+import org.hibernate.type.LiteralType;
import org.hibernate.type.Type;
-import org.hibernate.type.BooleanType;
import org.hibernate.Hibernate;
import org.hibernate.QueryException;
import org.hibernate.engine.SessionFactoryImplementor;
@@ -42,33 +42,37 @@
return expectedType == null ? Hibernate.BOOLEAN : expectedType;
}
- public BooleanType getTypeInternal() {
- return ( BooleanType ) getDataType();
- }
-
public Boolean getValue() {
return getType() == TRUE ? Boolean.TRUE : Boolean.FALSE;
}
/**
- * Expected-types really only pertinent here for boolean literals...
- *
- * @param expectedType
+ * {@inheritDoc}
*/
public void setExpectedType(Type expectedType) {
this.expectedType = expectedType;
}
+ /**
+ * {@inheritDoc}
+ */
public Type getExpectedType() {
return expectedType;
}
+ /**
+ * {@inheritDoc}
+ */
public String getRenderText(SessionFactoryImplementor sessionFactory) {
try {
- return getTypeInternal().objectToSQLString( getValue(), sessionFactory.getDialect() );
+ return typeAsLiteralType().objectToSQLString( getValue(), sessionFactory.getDialect() );
}
catch( Throwable t ) {
throw new QueryException( "Unable to render boolean literal value", t );
}
}
+
+ private LiteralType typeAsLiteralType() {
+ return (LiteralType) getDataType();
+ }
}
14 years, 11 months
Hibernate SVN: r18489 - in search/trunk: src/test/java/org/hibernate/search/test/embedded and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-01-09 14:47:29 -0500 (Sat, 09 Jan 2010)
New Revision: 18489
Added:
search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java
Removed:
search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java
Modified:
search/trunk/pom.xml
search/trunk/src/test/java/org/hibernate/search/test/embedded/Address.java
search/trunk/src/test/java/org/hibernate/search/test/embedded/Country.java
search/trunk/src/test/java/org/hibernate/search/test/embedded/State.java
search/trunk/src/test/java/org/hibernate/search/test/embedded/Tower.java
search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Attribute.java
search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Place.java
search/trunk/src/test/java/org/hibernate/search/test/engine/BusLine.java
search/trunk/src/test/java/org/hibernate/search/test/engine/BusStop.java
Log:
HSEARCH-408 changed test data setup to allow formode once
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/pom.xml 2010-01-09 19:47:29 UTC (rev 18489)
@@ -161,7 +161,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <forkMode>pertest</forkMode>
+ <forkMode>once</forkMode>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<systemProperties>
<property>
@@ -801,7 +801,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <forkMode>pertest</forkMode>
+ <forkMode>once</forkMode>
+ <!--argLine>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</argLine-->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<excludes>
<exclude>**/classloading/*.java</exclude>
@@ -828,7 +829,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <forkMode>pertest</forkMode>
+ <forkMode>once</forkMode>
+ <!--argLine>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005</argLine-->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<excludes>
<exclude>none</exclude>
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/Address.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/Address.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/Address.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -26,20 +26,20 @@
import java.util.HashSet;
import java.util.Set;
+import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
-import javax.persistence.CascadeType;
+import org.hibernate.annotations.Target;
import org.hibernate.search.annotations.ContainedIn;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.IndexedEmbedded;
-import org.hibernate.annotations.Target;
/**
* @author Emmanuel Bernard
@@ -53,7 +53,7 @@
@DocumentId
private Long id;
- @Field(index= Index.TOKENIZED)
+ @Field(index = Index.TOKENIZED)
private String street;
@IndexedEmbedded(depth = 1, prefix = "ownedBy_", targetElement = Owner.class)
@@ -64,19 +64,10 @@
@ContainedIn
private Set<Tower> towers = new HashSet<Tower>();
- public Country getCountry() {
- return country;
- }
-
- public void setCountry(Country country) {
- this.country = country;
- }
-
- @ManyToOne(cascade = { CascadeType.PERSIST })
+ @ManyToOne(cascade = CascadeType.ALL)
@IndexedEmbedded
private Country country;
-
public Long getId() {
return id;
}
@@ -109,4 +100,12 @@
public void setTowers(Set<Tower> towers) {
this.towers = towers;
}
+
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
}
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/Country.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/Country.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/Country.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -26,14 +26,13 @@
import java.util.ArrayList;
import java.util.List;
-
+import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
-import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.IndexColumn;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
@@ -54,10 +53,9 @@
@Field
private String name;
- @OneToMany(fetch = FetchType.LAZY)
+ @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
//FIXME with JPA 2, move to @OrderColumn
@IndexColumn(name = "list_position")
- @Cascade(org.hibernate.annotations.CascadeType.ALL)
@IndexedEmbedded
private List<State> states = new ArrayList<State>();
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/State.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/State.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/State.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -24,6 +24,7 @@
*/
package org.hibernate.search.test.embedded;
+import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -47,7 +48,7 @@
private String name;
@ContainedIn
- @OneToOne(mappedBy = "state")
+ @OneToOne(mappedBy = "state", cascade = CascadeType.ALL)
private StateCandidate candidate;
public Integer getId() {
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/Tower.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/Tower.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/Tower.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -47,10 +47,10 @@
@DocumentId
private Long id;
- @Field( index = Index.TOKENIZED )
+ @Field(index = Index.TOKENIZED)
private String name;
- @ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE } )
+ @ManyToOne(cascade = CascadeType.ALL)
@IndexedEmbedded
private Address address;
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Attribute.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Attribute.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Attribute.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -51,7 +51,7 @@
@ContainedIn
private Product product;
- @OneToMany(mappedBy = "attribute", fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.REMOVE })
+ @OneToMany(mappedBy = "attribute", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@IndexedEmbedded
private List<AttributeValue> values;
Modified: search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Place.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Place.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Place.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -50,7 +50,7 @@
@Field(index = Index.TOKENIZED)
private String name;
- @OneToOne(cascade = { CascadeType.PERSIST, CascadeType.REMOVE })
+ @OneToOne(cascade = CascadeType.ALL)
@IndexedEmbedded
private Address address;
Deleted: search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -1,68 +0,0 @@
-/* $Id$
- *
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors. All third-party contributions are
- * distributed under license by Red Hat, Inc.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA 02110-1301 USA
- */
-package org.hibernate.search.test.embedded.nested;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-
-import org.hibernate.search.annotations.Indexed;
-import org.hibernate.search.annotations.IndexedEmbedded;
-
-/**
- * @author Hardy Ferentschik
- */
-@Entity
-@Indexed
-public class Product {
- @Id
- @GeneratedValue
- private long id;
-
- @OneToMany(mappedBy = "product", fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.REMOVE })
- @IndexedEmbedded
- private List<Attribute> attributes;
-
- public Product() {
- attributes = new ArrayList<Attribute>();
- }
-
- public long getId() {
- return id;
- }
-
- public List<Attribute> getAttributes() {
- return attributes;
- }
-
- public void setAttribute(Attribute attribute) {
- attributes.add( attribute );
- }
-}
Added: search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java (rev 0)
+++ search/trunk/src/test/java/org/hibernate/search/test/embedded/nested/Product.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -0,0 +1,68 @@
+/* $Id: Product.java 17630 2009-10-06 13:38:43Z sannegrinovero $
+ *
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009, Red Hat, Inc. and/or its affiliates or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat, Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+package org.hibernate.search.test.embedded.nested;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+
+import org.hibernate.search.annotations.Indexed;
+import org.hibernate.search.annotations.IndexedEmbedded;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Entity
+@Indexed
+public class Product {
+ @Id
+ @GeneratedValue
+ private long id;
+
+ @OneToMany(mappedBy = "product", fetch = FetchType.EAGER, cascade = CascadeType.ALL)
+ @IndexedEmbedded
+ private List<Attribute> attributes;
+
+ public Product() {
+ attributes = new ArrayList<Attribute>();
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public List<Attribute> getAttributes() {
+ return attributes;
+ }
+
+ public void setAttribute(Attribute attribute) {
+ attributes.add( attribute );
+ }
+}
Modified: search/trunk/src/test/java/org/hibernate/search/test/engine/BusLine.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/engine/BusLine.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/engine/BusLine.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -26,7 +26,6 @@
import java.util.HashSet;
import java.util.Set;
-
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
@@ -42,19 +41,19 @@
/**
* Test entity: BusLine have many BusStops: needed to verify
* indexing of a lazy-loaded collection in out-of-transaction use case.
- *
+ *
* @author Sanne Grinovero
*/
@Entity
@Indexed
public class BusLine {
-
+
private Long id;
private String busLineName;
private Set<BusStop> stops = new HashSet<BusStop>();
@Id
- @GeneratedValue
+ @GeneratedValue
public Long getId() {
return id;
}
@@ -63,7 +62,7 @@
this.id = id;
}
- @Field(index=Index.NO,store=Store.YES)
+ @Field(index = Index.NO, store = Store.YES)
public String getBusLineName() {
return busLineName;
}
@@ -72,12 +71,12 @@
this.busLineName = busLine;
}
- @ManyToMany(cascade=CascadeType.PERSIST)
+ @ManyToMany(cascade = CascadeType.ALL)
@IndexedEmbedded
public Set<BusStop> getStops() {
return stops;
}
-
+
public void setStops(Set<BusStop> stops) {
this.stops = stops;
}
@@ -86,25 +85,31 @@
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + ((busLineName == null) ? 0 : busLineName.hashCode());
+ result = prime * result + ( ( busLineName == null ) ? 0 : busLineName.hashCode() );
return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if ( this == obj ) {
return true;
- if (obj == null)
+ }
+ if ( obj == null ) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if ( getClass() != obj.getClass() ) {
return false;
- BusLine other = (BusLine) obj;
- if (busLineName == null) {
- if (other.busLineName != null)
+ }
+ BusLine other = ( BusLine ) obj;
+ if ( busLineName == null ) {
+ if ( other.busLineName != null ) {
return false;
- } else if (!busLineName.equals(other.busLineName))
+ }
+ }
+ else if ( !busLineName.equals( other.busLineName ) ) {
return false;
+ }
return true;
}
-
+
}
Modified: search/trunk/src/test/java/org/hibernate/search/test/engine/BusStop.java
===================================================================
--- search/trunk/src/test/java/org/hibernate/search/test/engine/BusStop.java 2010-01-09 18:45:58 UTC (rev 18488)
+++ search/trunk/src/test/java/org/hibernate/search/test/engine/BusStop.java 2010-01-09 19:47:29 UTC (rev 18489)
@@ -26,7 +26,7 @@
import java.util.HashSet;
import java.util.Set;
-
+import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -37,12 +37,12 @@
/**
* Test entity: BusStop is @ContainedIn BusLine
- *
+ *
* @author Sanne Grinovero
*/
@Entity
public class BusStop {
-
+
private Long id;
private String roadName;
private Set<BusLine> busses = new HashSet<BusLine>();
@@ -66,7 +66,7 @@
this.roadName = roadName;
}
- @ManyToMany(mappedBy="stops")
+ @ManyToMany(mappedBy = "stops", cascade = CascadeType.ALL)
@ContainedIn
public Set<BusLine> getBusses() {
return busses;
@@ -81,25 +81,31 @@
final int prime = 31;
int result = 1;
result = prime * result
- + ((roadName == null) ? 0 : roadName.hashCode());
+ + ( ( roadName == null ) ? 0 : roadName.hashCode() );
return result;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if ( this == obj ) {
return true;
- if (obj == null)
+ }
+ if ( obj == null ) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if ( getClass() != obj.getClass() ) {
return false;
- BusStop other = (BusStop) obj;
- if (roadName == null) {
- if (other.roadName != null)
+ }
+ BusStop other = ( BusStop ) obj;
+ if ( roadName == null ) {
+ if ( other.roadName != null ) {
return false;
- } else if (!roadName.equals(other.roadName))
+ }
+ }
+ else if ( !roadName.equals( other.roadName ) ) {
return false;
+ }
return true;
}
-
+
}
14 years, 11 months
Hibernate SVN: r18488 - in search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test: query and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-09 13:45:58 -0500 (Sat, 09 Jan 2010)
New Revision: 18488
Modified:
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/PurgeTest.java
search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/query/LuceneQueryTest.java
Log:
JBPAPP-3378 non-utf8 data cause tests fail on sybase
Modified: search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/PurgeTest.java
===================================================================
--- search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/PurgeTest.java 2010-01-09 18:33:33 UTC (rev 18487)
+++ search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/PurgeTest.java 2010-01-09 18:45:58 UTC (rev 18488)
@@ -31,7 +31,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();
s.clear();
@@ -75,7 +75,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();
s.clear();
Modified: search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/query/LuceneQueryTest.java
===================================================================
--- search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/query/LuceneQueryTest.java 2010-01-09 18:33:33 UTC (rev 18487)
+++ search/branches/v3_1_1_GA_CP/src/test/java/org/hibernate/search/test/query/LuceneQueryTest.java 2010-01-09 18:45:58 UTC (rev 18488)
@@ -34,7 +34,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();
s.clear();
@@ -89,7 +89,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();
s.clear();
@@ -125,7 +125,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();
s.clear();
@@ -171,7 +171,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();//post commit events for lucene
s.clear();
@@ -217,7 +217,7 @@
s.save( clock );
Book book = new Book( 1, "La chute de la petite reine a travers les yeux de Festina", "La chute de la petite reine a travers les yeux de Festina, blahblah" );
s.save( book );
- book = new Book( 2, "La gloire de mon p�re", "Les deboires de mon p�re en v�lo" );
+ book = new Book( 2, "La gloire de mon pre", "Les deboires de mon pre en vlo" );
s.save( book );
tx.commit();//post commit events for lucene
s.clear();
14 years, 11 months
Hibernate SVN: r18487 - entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-09 13:33:33 -0500 (Sat, 09 Jan 2010)
New Revision: 18487
Modified:
entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/QueryTest.java
Log:
JBPAPP-3378 non-utf8 data cause tests fail on sybase
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/QueryTest.java
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/QueryTest.java 2010-01-09 18:01:20 UTC (rev 18486)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/ejb/test/QueryTest.java 2010-01-09 18:33:33 UTC (rev 18487)
@@ -51,7 +51,7 @@
public void testParameterList() throws Exception {
final Item item = new Item( "Mouse", "Micro$oft mouse" );
- final Item item2 = new Item( "Computer", "D�ll computer" );
+ final Item item2 = new Item( "Computer", "Dell computer" );
EntityManager em = getOrCreateEntityManager();
em.getTransaction().begin();
@@ -123,7 +123,7 @@
public void testEscapeCharacter() throws Exception {
final Item item = new Item( "Mouse", "Micro_oft mouse" );
- final Item item2 = new Item( "Computer", "D�ll computer" );
+ final Item item2 = new Item( "Computer", "Dell computer" );
EntityManager em = getOrCreateEntityManager();
em.getTransaction().begin();
14 years, 11 months
Hibernate SVN: r18486 - core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-01-09 13:01:20 -0500 (Sat, 09 Jan 2010)
New Revision: 18486
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java
Log:
HHH-4774 - Do not handle literals using parameters in JPA criteria select
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java 2010-01-09 17:46:41 UTC (rev 18485)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/expression/LiteralExpression.java 2010-01-09 18:01:20 UTC (rev 18486)
@@ -93,7 +93,7 @@
// some drivers/servers do not like parameters in the select clause
final ValueHandlerFactory.ValueHandler handler =
ValueHandlerFactory.determineAppropriateHandler( literal.getClass() );
- if ( ! ValueHandlerFactory.isCharacter( literal ) ) {
+ if ( ValueHandlerFactory.isCharacter( literal ) ) {
return '\'' + handler.render( literal ) + '\'';
}
else {
14 years, 11 months
Hibernate SVN: r18485 - in entitymanager/branches/v3_4_0_GA_CP/src/test: bundles/defaultpar/META-INF and 6 other directories.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-09 12:46:41 -0500 (Sat, 09 Jan 2010)
New Revision: 18485
Modified:
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/cfgxmlpar/org/hibernate/ejb/test/pack/cfgxmlpar/hibernate.cfg.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/defaultpar/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/excludehbmpar/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explicitpar/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explodedpar/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/overridenpar/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/war/WEB-INF/classes/META-INF/persistence.xml
entitymanager/branches/v3_4_0_GA_CP/src/test/resources/org/hibernate/ejb/test/hibernate.cfg.xml
Log:
JBPAPP-3377 some EM test doesn't be tested on other DBs
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/cfgxmlpar/org/hibernate/ejb/test/pack/cfgxmlpar/hibernate.cfg.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/cfgxmlpar/org/hibernate/ejb/test/pack/cfgxmlpar/hibernate.cfg.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/cfgxmlpar/org/hibernate/ejb/test/pack/cfgxmlpar/hibernate.cfg.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -4,11 +4,12 @@
<hibernate-configuration>
<session-factory>
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <property name="hibernate.connection.url">jdbc:hsqldb:.</property>
+ <property name="hibernate.dialect">${db.dialect}</property>
+ <property name="hibernate.connection.driver_class">${jdbc.driver}</property>
+ <property name="hibernate.connection.username">${jdbc.user}</property>
+ <property name="hibernate.connection.password">${jdbc.pass}</property>
+ <property name="hibernate.connection.url">${jdbc.url}</property>
+ <property name="hibernate.connection.isolation">${jdbc.isolation}</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.region_prefix">hibernate.test</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/defaultpar/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/defaultpar/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/defaultpar/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -7,11 +7,12 @@
<persistence-unit name="defaultpar">
<class>org.hibernate.ejb.test.pack.defaultpar.Lighter</class>
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
+ <property name="hibernate.connection.driver_class" value="${jdbc.driver}"/>
+ <property name="hibernate.connection.username" value="${jdbc.user}"/>
+ <property name="hibernate.connection.password" value="${jdbc.pass}"/>
+ <property name="hibernate.connection.url" value="${jdbc.url}"/>
+ <property name="hibernate.connection.isolation" value="${jdbc.isolation}"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
</properties>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/excludehbmpar/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/excludehbmpar/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/excludehbmpar/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -7,11 +7,12 @@
<persistence-unit name="excludehbmpar" transaction-type="RESOURCE_LOCAL">
<mapping-file>META-INF/orm2.xml</mapping-file>
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
+ <property name="hibernate.connection.driver_class" value="${jdbc.driver}"/>
+ <property name="hibernate.connection.username" value="${jdbc.user}"/>
+ <property name="hibernate.connection.password" value="${jdbc.pass}"/>
+ <property name="hibernate.connection.url" value="${jdbc.url}"/>
+ <property name="hibernate.connection.isolation" value="${jdbc.isolation}"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.archive.autodetection" value="class"/>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explicitpar/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explicitpar/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explicitpar/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -12,11 +12,12 @@
<class>org.hibernate.ejb.test</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
+ <property name="hibernate.connection.driver_class" value="${jdbc.driver}"/>
+ <property name="hibernate.connection.username" value="${jdbc.user}"/>
+ <property name="hibernate.connection.password" value="${jdbc.pass}"/>
+ <property name="hibernate.connection.url" value="${jdbc.url}"/>
+ <property name="hibernate.connection.isolation" value="${jdbc.isolation}"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.cache.region_prefix" value="hibernate.test"/>
<property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explodedpar/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explodedpar/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/explodedpar/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -7,11 +7,12 @@
<persistence-unit name="explodedpar" transaction-type="RESOURCE_LOCAL">
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
+ <property name="hibernate.connection.driver_class" value="${jdbc.driver}"/>
+ <property name="hibernate.connection.username" value="${jdbc.user}"/>
+ <property name="hibernate.connection.password" value="${jdbc.pass}"/>
+ <property name="hibernate.connection.url" value="${jdbc.url}"/>
+ <property name="hibernate.connection.isolation" value="${jdbc.isolation}"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
</properties>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/overridenpar/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/overridenpar/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/overridenpar/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -6,7 +6,7 @@
<persistence-unit name="overridenpar">
<jta-data-source>java:/unreachableDS</jta-data-source>
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
</properties>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/war/WEB-INF/classes/META-INF/persistence.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/war/WEB-INF/classes/META-INF/persistence.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/bundles/war/WEB-INF/classes/META-INF/persistence.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -7,11 +7,12 @@
<persistence-unit name="defaultpar">
<class>org.hibernate.ejb.test.pack.defaultpar.Lighter</class>
<properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
+ <property name="hibernate.dialect" value="${db.dialect}"/>
+ <property name="hibernate.connection.driver_class" value="${jdbc.driver}"/>
+ <property name="hibernate.connection.username" value="${jdbc.user}"/>
+ <property name="hibernate.connection.password" value="${jdbc.pass}"/>
+ <property name="hibernate.connection.url" value="${jdbc.url}"/>
+ <property name="hibernate.connection.isolation" value="${jdbc.isolation}"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
</properties>
Modified: entitymanager/branches/v3_4_0_GA_CP/src/test/resources/org/hibernate/ejb/test/hibernate.cfg.xml
===================================================================
--- entitymanager/branches/v3_4_0_GA_CP/src/test/resources/org/hibernate/ejb/test/hibernate.cfg.xml 2010-01-09 17:32:34 UTC (rev 18484)
+++ entitymanager/branches/v3_4_0_GA_CP/src/test/resources/org/hibernate/ejb/test/hibernate.cfg.xml 2010-01-09 17:46:41 UTC (rev 18485)
@@ -4,11 +4,12 @@
<hibernate-configuration>
<session-factory>
- <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
- <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
- <property name="hibernate.connection.username">sa</property>
- <property name="hibernate.connection.password"></property>
- <property name="hibernate.connection.url">jdbc:hsqldb:.</property>
+ <property name="hibernate.dialect">${db.dialect}</property>
+ <property name="hibernate.connection.driver_class">${jdbc.driver}</property>
+ <property name="hibernate.connection.username">${jdbc.user}</property>
+ <property name="hibernate.connection.password">${jdbc.pass}</property>
+ <property name="hibernate.connection.url">${jdbc.url}</property>
+ <property name="hibernate.connection.isolation">${jdbc.isolation}</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.cache.region_prefix">hibernate.test</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
14 years, 11 months
Hibernate SVN: r18484 - core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-01-09 12:32:34 -0500 (Sat, 09 Jan 2010)
New Revision: 18484
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java
Log:
HHH-4775 - CriteriaBuilder#notEqual being interpreted oppositely
Modified: core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java
===================================================================
--- core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java 2010-01-09 17:04:55 UTC (rev 18483)
+++ core/trunk/entitymanager/src/main/java/org/hibernate/ejb/criteria/CriteriaBuilderImpl.java 2010-01-09 17:32:34 UTC (rev 18484)
@@ -366,7 +366,7 @@
*/
public Predicate notEqual(Expression<?> x, Object y) {
//noinspection SuspiciousNameCombination
- return new ComparisonPredicate( this, ComparisonOperator.NOT_EQUAL, x, y ).not();
+ return new ComparisonPredicate( this, ComparisonOperator.NOT_EQUAL, x, y );
}
/**
14 years, 11 months