Search in sources :

Example 1 with AbstractMultiTableBulkIdStrategyImpl

use of org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl in project hibernate-orm by hibernate.

the class Oracle8iDialectTestCase method testTemporaryTableNameTruncation.

@Test
@TestForIssue(jiraKey = "HHH-9290")
public void testTemporaryTableNameTruncation() throws Exception {
    final AbstractMultiTableBulkIdStrategyImpl strategy = (AbstractMultiTableBulkIdStrategyImpl) new Oracle8iDialect().getDefaultMultiTableBulkIdStrategy();
    String temporaryTableName = strategy.getIdTableSupport().generateIdTableName("TABLE_NAME_THAT_EXCEEDS_30_CHARACTERS");
    assertEquals("Temporary table names should be truncated to 30 characters", 30, temporaryTableName.length());
    assertEquals("Temporary table names should start with HT_", "HT_TABLE_NAME_THAT_EXCEEDS_30_", temporaryTableName);
}
Also used : AbstractMultiTableBulkIdStrategyImpl(org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl) Test(org.junit.Test) TestForIssue(org.hibernate.testing.TestForIssue)

Aggregations

AbstractMultiTableBulkIdStrategyImpl (org.hibernate.hql.spi.id.AbstractMultiTableBulkIdStrategyImpl)1 TestForIssue (org.hibernate.testing.TestForIssue)1 Test (org.junit.Test)1