HHH-5335 - a few typo fixes in Dialect and in tests
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@20269 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
88ef160293
commit
a8c7b9c1f0
|
@ -1798,7 +1798,7 @@ public abstract class Dialect {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does the dialect support propogating changes to LOB
|
* Does the dialect support propagating changes to LOB
|
||||||
* values back to the database? Talking about mutating the
|
* values back to the database? Talking about mutating the
|
||||||
* internal value of the locator as opposed to supplying a new
|
* internal value of the locator as opposed to supplying a new
|
||||||
* locator instance...
|
* locator instance...
|
||||||
|
@ -1820,7 +1820,7 @@ public abstract class Dialect {
|
||||||
* databases which (1) are not part of the cruise control process
|
* databases which (1) are not part of the cruise control process
|
||||||
* or (2) do not {@link #supportsExpectedLobUsagePattern}.
|
* or (2) do not {@link #supportsExpectedLobUsagePattern}.
|
||||||
*
|
*
|
||||||
* @return True if the changes are propogated back to the
|
* @return True if the changes are propagated back to the
|
||||||
* database; false otherwise.
|
* database; false otherwise.
|
||||||
* @since 3.2
|
* @since 3.2
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
|
||||||
|
|
||||||
public boolean supportsCircularCascadeDeleteConstraints() {
|
public boolean supportsCircularCascadeDeleteConstraints() {
|
||||||
// SQL Server (at least up through 2005) does not support defining
|
// SQL Server (at least up through 2005) does not support defining
|
||||||
// cascade delete constraints which can circel back to the mutating
|
// cascade delete constraints which can circle back to the mutating
|
||||||
// table
|
// table
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ public class JPALockTest extends AbstractJPATest {
|
||||||
|
|
||||||
myEntity = (MyEntity) s1.get( MyEntity.class, myEntity.getId() );
|
myEntity = (MyEntity) s1.get( MyEntity.class, myEntity.getId() );
|
||||||
s1.lock( myEntity, LockMode.FORCE );
|
s1.lock( myEntity, LockMode.FORCE );
|
||||||
assertTrue( "LockMode.FORCE on a unversioned entity should degrade nicely to UPGRADE", true );
|
assertTrue( "LockMode.FORCE on a un-versioned entity should degrade nicely to UPGRADE", true );
|
||||||
|
|
||||||
s1.lock( item, LockMode.FORCE );
|
s1.lock( item, LockMode.FORCE );
|
||||||
assertEquals( "subsequent LockMode.FORCE did not no-op", initialVersion + 1, item.getVersion() );
|
assertEquals( "subsequent LockMode.FORCE did not no-op", initialVersion + 1, item.getVersion() );
|
||||||
|
@ -177,7 +177,7 @@ public class JPALockTest extends AbstractJPATest {
|
||||||
item2.setName( "updated" );
|
item2.setName( "updated" );
|
||||||
try {
|
try {
|
||||||
t2.commit();
|
t2.commit();
|
||||||
fail( "optimisitc lock should have failed" );
|
fail( "optimistic lock should have failed" );
|
||||||
}
|
}
|
||||||
catch (Throwable ignore) {
|
catch (Throwable ignore) {
|
||||||
// expected behavior
|
// expected behavior
|
||||||
|
|
|
@ -1,4 +1,26 @@
|
||||||
//$Id: OptimisticLockTest.java 11303 2007-03-19 22:06:14Z steve.ebersole@jboss.com $
|
/*
|
||||||
|
* 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.test.optlock;
|
package org.hibernate.test.optlock;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
|
@ -12,7 +34,7 @@ import org.hibernate.testing.junit.functional.FunctionalTestCase;
|
||||||
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
|
import org.hibernate.testing.junit.functional.FunctionalTestClassTestSuite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests relating to the optimisitc-lock mapping option.
|
* Tests relating to the optimistic-lock mapping option.
|
||||||
*
|
*
|
||||||
* @author Gavin King
|
* @author Gavin King
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
|
@ -76,7 +98,7 @@ public class OptimisticLockTest extends FunctionalTestCase {
|
||||||
otherSession.close();
|
otherSession.close();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
doc.setSummary( "A machiavelian achievement of epic proportions" );
|
doc.setSummary( "A machiavellian achievement of epic proportions" );
|
||||||
mainSession.flush();
|
mainSession.flush();
|
||||||
fail( "expecting opt lock failure" );
|
fail( "expecting opt lock failure" );
|
||||||
}
|
}
|
||||||
|
@ -110,6 +132,7 @@ public class OptimisticLockTest extends FunctionalTestCase {
|
||||||
mainSession.close();
|
mainSession.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "UnnecessaryBoxing" })
|
||||||
private void testDeleteOptimisticLockFailure(String entityName) {
|
private void testDeleteOptimisticLockFailure(String entityName) {
|
||||||
if ( getDialect().doesRepeatableReadCauseReadersToBlockWriters() ) {
|
if ( getDialect().doesRepeatableReadCauseReadersToBlockWriters() ) {
|
||||||
reportSkip( "deadlock", "delete optimistic locking" );
|
reportSkip( "deadlock", "delete optimistic locking" );
|
||||||
|
@ -127,7 +150,7 @@ public class OptimisticLockTest extends FunctionalTestCase {
|
||||||
mainSession.flush();
|
mainSession.flush();
|
||||||
doc.setSummary( "A modern classic" );
|
doc.setSummary( "A modern classic" );
|
||||||
mainSession.flush();
|
mainSession.flush();
|
||||||
doc.getPubDate().setMonth( new Integer( 3 ) );
|
doc.getPubDate().setMonth( Integer.valueOf( 3 ) );
|
||||||
mainSession.flush();
|
mainSession.flush();
|
||||||
mainSession.getTransaction().commit();
|
mainSession.getTransaction().commit();
|
||||||
mainSession.close();
|
mainSession.close();
|
||||||
|
|
Loading…
Reference in New Issue