@Test @Resources(annotatedClasses = TestEntity4.class) public void testExplicitJoinTableName() { EntityBinding entityBinding = getEntityBinding(TestEntity4.class); BagBinding bagBinding = (BagBinding) entityBinding.locateAttributeBinding("strings"); TableSpecification tableSpec = bagBinding.getPluralAttributeKeyBinding().getCollectionTable(); assertEquals( "Wrong default collection table name", "STRING_COLLECTION", tableSpec.getLogicalName().getText()); }
@Test public void testAbstractTableExistence() { for (Schema schema : getMetadata().getDatabase().getSchemas()) { for (TableSpecification table : schema.getTables()) { if ("AbstractEntity_AUD".equals(table.getLogicalName().getText())) { Assert.assertFalse(Table.class.isInstance(table)); return; } } } Assert.fail(); }