HHH-9189 HHH-9189 : Initial value for sequence in HBM mapping
This commit is contained in:
parent
e4426c9249
commit
483bfdb74d
|
@ -63,8 +63,7 @@ public class EntityLoader extends AbstractLoadPlanBasedEntityLoader {
|
|||
private final OuterJoinLoadable persister;
|
||||
private int batchSize = 1;
|
||||
private LoadQueryInfluencers influencers = LoadQueryInfluencers.NONE;
|
||||
private LockMode lockMode = LockMode.NONE;
|
||||
private LockOptions lockOptions;
|
||||
private LockOptions lockOptions = new LockOptions( LockMode.NONE );
|
||||
|
||||
public Builder(OuterJoinLoadable persister) {
|
||||
this.persister = persister;
|
||||
|
@ -81,7 +80,7 @@ public class EntityLoader extends AbstractLoadPlanBasedEntityLoader {
|
|||
}
|
||||
|
||||
public Builder withLockMode(LockMode lockMode) {
|
||||
this.lockMode = lockMode;
|
||||
this.lockOptions.setLockMode( lockMode );
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -113,7 +112,7 @@ public class EntityLoader extends AbstractLoadPlanBasedEntityLoader {
|
|||
|
||||
@Override
|
||||
public LockMode getLockMode() {
|
||||
return lockMode;
|
||||
return lockOptions.getLockMode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,8 +4,10 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
import org.hibernate.dialect.SQLServer2012Dialect;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.RequiresDialect;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.hibernate.testing.SkipForDialect;
|
||||
|
@ -13,11 +15,11 @@ import org.hibernate.testing.TestForIssue;
|
|||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SQLServer2012SequenceGeneratorTest extends BaseCoreFunctionalTestCase {
|
||||
public class SequenceGeneratorWithInitialValueTest extends BaseCoreFunctionalTestCase {
|
||||
|
||||
@Override
|
||||
public String[] getMappings() {
|
||||
return new String[] { "id/SQLServer2012Person.hbm.xml" };
|
||||
return new String[] { "id/PersonWithSequenceInitialValue.hbm.xml" };
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,7 +29,8 @@ public class SQLServer2012SequenceGeneratorTest extends BaseCoreFunctionalTestCa
|
|||
*/
|
||||
@Test
|
||||
@TestForIssue(jiraKey = "HHH-8814")
|
||||
@RequiresDialect(value=SQLServer2012Dialect.class)
|
||||
@FailureExpectedWithNewMetamodel(jiraKey = "HHH-9189")
|
||||
@RequiresDialect(value={SQLServer2012Dialect.class, H2Dialect.class})
|
||||
public void testStartOfSequence() throws Exception {
|
||||
Session s = openSession();
|
||||
Transaction tx = s.beginTransaction();
|
Loading…
Reference in New Issue