diff --git a/docs/en/reference/annotations-reference.rst b/docs/en/reference/annotations-reference.rst index 27271f491..123fb3b2d 100644 --- a/docs/en/reference/annotations-reference.rst +++ b/docs/en/reference/annotations-reference.rst @@ -1129,6 +1129,7 @@ Optional attributes: - **indexes**: Array of @Index annotations - **uniqueConstraints**: Array of @UniqueConstraint annotations. +- **schema**: (>= 2.5) Name of the schema the table lies in. Example: @@ -1140,6 +1141,7 @@ Example: * @Table(name="user", * uniqueConstraints={@UniqueConstraint(name="user_unique",columns={"username"})}, * indexes={@Index(name="user_idx", columns={"email"})} + * schema="schema_name" * ) */ class User { } diff --git a/docs/en/reference/php-mapping.rst b/docs/en/reference/php-mapping.rst index d7734ea12..78a721411 100644 --- a/docs/en/reference/php-mapping.rst +++ b/docs/en/reference/php-mapping.rst @@ -241,6 +241,7 @@ General Getters - ``getTableName()`` +- ``getSchemaName()`` - ``getTemporaryIdTableName()`` Identifier Getters diff --git a/docs/en/reference/xml-mapping.rst b/docs/en/reference/xml-mapping.rst index 6793b22f6..93e531aa6 100644 --- a/docs/en/reference/xml-mapping.rst +++ b/docs/en/reference/xml-mapping.rst @@ -187,7 +187,7 @@ specified as the ```` element as a direct child of the .. code-block:: xml - + @@ -211,6 +211,7 @@ Optional attributes: - **read-only** - (>= 2.1) Specifies that this entity is marked as read only and not considered for change-tracking. Entities of this type can be persisted and removed though. +- **schema** - (>= 2.5) The schema the table lies in, for platforms that support schemas Defining Fields ~~~~~~~~~~~~~~~ diff --git a/docs/en/reference/yaml-mapping.rst b/docs/en/reference/yaml-mapping.rst index 1f2e31d34..ea54e277a 100644 --- a/docs/en/reference/yaml-mapping.rst +++ b/docs/en/reference/yaml-mapping.rst @@ -74,6 +74,7 @@ of several common elements: type: entity repositoryClass: Doctrine\Tests\ORM\Mapping\UserRepository table: cms_users + schema: schema_name # The schema the table lies in, for platforms that support schemas (Optional, >= 2.5) readOnly: true indexes: name_index: diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index dd65c3932..cf0c6d9cd 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -576,10 +576,11 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory // Platforms that do not have native IDENTITY support need a sequence to emulate this behaviour. if ($this->targetPlatform->usesSequenceEmulatedIdentityColumns()) { - $columnName = $class->getSingleIdentifierColumnName(); - $quoted = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']); - $sequenceName = $this->targetPlatform->getIdentitySequenceName($class->getTableName(), $columnName); - $definition = array( + $columnName = $class->getSingleIdentifierColumnName(); + $quoted = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']); + $sequencePrefix = $class->getSequencePrefix($this->targetPlatform); + $sequenceName = $this->targetPlatform->getIdentitySequenceName($sequencePrefix, $columnName); + $definition = array( 'sequenceName' => $this->targetPlatform->fixSchemaElementName($sequenceName) ); @@ -608,10 +609,10 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory if ( ! $definition) { $fieldName = $class->getSingleIdentifierFieldName(); - $columnName = $class->getSingleIdentifierColumnName(); + $sequenceName = $class->getSequenceName($this->targetPlatform); $quoted = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']); - $sequenceName = $class->getTableName() . '_' . $columnName . '_seq'; - $definition = array( + + $definition = array( 'sequenceName' => $this->targetPlatform->fixSchemaElementName($sequenceName), 'allocationSize' => 1, 'initialValue' => 1, diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 76dd8f1e6..8d482e84d 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -24,6 +24,7 @@ use Doctrine\Instantiator\Instantiator; use InvalidArgumentException; use RuntimeException; use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Platforms\AbstractPlatform; use ReflectionClass; use Doctrine\Common\Persistence\Mapping\ClassMetadata; use Doctrine\Common\ClassLoader; @@ -2014,6 +2015,16 @@ class ClassMetadataInfo implements ClassMetadata return $this->table['name']; } + /** + * Gets primary table's schema name. + * + * @return string|null + */ + public function getSchemaName() + { + return isset($this->table['schema']) ? $this->table['schema'] : null; + } + /** * Gets the table name to use for temporary identifier tables of this class. * @@ -2235,6 +2246,11 @@ class ClassMetadataInfo implements ClassMetadata public function setPrimaryTable(array $table) { if (isset($table['name'])) { + // Split schema and table name from a table name like "myschema.mytable" + if (strpos($table['name'], '.') !== false) { + list($this->table['schema'], $table['name']) = explode('.', $table['name'], 2); + } + if ($table['name'][0] === '`') { $table['name'] = trim($table['name'], '`'); $this->table['quoted'] = true; @@ -2243,6 +2259,10 @@ class ClassMetadataInfo implements ClassMetadata $this->table['name'] = $table['name']; } + if (isset($table['schema'])) { + $this->table['schema'] = $table['schema']; + } + if (isset($table['indexes'])) { $this->table['indexes'] = $table['indexes']; } @@ -3240,4 +3260,47 @@ class ClassMetadataInfo implements ClassMetadata throw MappingException::duplicateFieldMapping($this->name, $fieldName); } } + + /** + * Gets the sequence name based on class metadata. + * + * @param AbstractPlatform $platform + * @return string + * + * @todo Sequence names should be computed in DBAL depending on the platform + */ + public function getSequenceName(AbstractPlatform $platform) + { + $sequencePrefix = $this->getSequencePrefix($platform); + + $columnName = $this->getSingleIdentifierColumnName(); + $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; + + return $sequenceName; + } + + /** + * Gets the sequence name prefix based on class metadata. + * + * @param AbstractPlatform $platform + * @return string + * + * @todo Sequence names should be computed in DBAL depending on the platform + */ + public function getSequencePrefix(AbstractPlatform $platform) + { + $tableName = $this->getTableName(); + $sequencePrefix = $tableName; + + // Prepend the schema name to the table name if there is one + if ($schemaName = $this->getSchemaName()) { + $sequencePrefix = $schemaName . '.' . $tableName; + + if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { + $sequencePrefix = $schemaName . '__' . $tableName; + } + } + + return $sequencePrefix; + } } diff --git a/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php b/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php index eb2d22332..eb5b85065 100644 --- a/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php +++ b/lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php @@ -41,12 +41,24 @@ class DefaultQuoteStrategy implements QuoteStrategy /** * {@inheritdoc} + * + * @todo Table names should be computed in DBAL depending on the platform */ public function getTableName(ClassMetadata $class, AbstractPlatform $platform) { - return isset($class->table['quoted']) - ? $platform->quoteIdentifier($class->table['name']) - : $class->table['name']; + $tableName = $class->table['name']; + + if ( ! empty($class->table['schema'])) { + $tableName = $class->table['schema'] . '.' . $class->table['name']; + + if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { + $tableName = $class->table['schema'] . '__' . $class->table['name']; + } + } + + return isset($class->table['quoted']) + ? $platform->quoteIdentifier($tableName) + : $tableName; } /** diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 85f40b2f5..df8b7b80c 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -93,9 +93,9 @@ class AnnotationDriver extends AbstractAnnotationDriver // Evaluate Table annotation if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) { - $tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table']; + $tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table']; $primaryTable = array( - 'name' => $tableAnnot->name, + 'name' => $tableAnnot->name, 'schema' => $tableAnnot->schema ); diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 2797fb126..c917eb245 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -76,12 +76,17 @@ class XmlDriver extends FileDriver } // Evaluate attributes - $table = array(); + $primaryTable = array(); + if (isset($xmlRoot['table'])) { - $table['name'] = (string)$xmlRoot['table']; + $primaryTable['name'] = (string) $xmlRoot['table']; } - $metadata->setPrimaryTable($table); + if (isset($xmlRoot['schema'])) { + $primaryTable['schema'] = (string) $xmlRoot['schema']; + } + + $metadata->setPrimaryTable($primaryTable); // Evaluate second level cache if (isset($xmlRoot->cache)) { @@ -150,11 +155,6 @@ class XmlDriver extends FileDriver } } - /* not implemented specially anyway. use table = schema.table - if (isset($xmlRoot['schema'])) { - $metadata->table['schema'] = (string)$xmlRoot['schema']; - }*/ - if (isset($xmlRoot['inheritance-type'])) { $inheritanceType = (string)$xmlRoot['inheritance-type']; $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index cf1dc5bc0..95d148318 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -73,10 +73,14 @@ class YamlDriver extends FileDriver } // Evaluate root level properties - $table = array(); + $primaryTable = array(); if (isset($element['table'])) { - $table['name'] = $element['table']; + $primaryTable['name'] = $element['table']; + } + + if (isset($element['schema'])) { + $primaryTable['schema'] = $element['schema']; } // Evaluate second level cache @@ -84,7 +88,7 @@ class YamlDriver extends FileDriver $metadata->enableCache($this->cacheToArray($element['cache'])); } - $metadata->setPrimaryTable($table); + $metadata->setPrimaryTable($primaryTable); // Evaluate named queries if (isset($element['namedQueries'])) { @@ -163,11 +167,6 @@ class YamlDriver extends FileDriver } } - /* not implemented specially anyway. use table = schema.table - if (isset($element['schema'])) { - $metadata->table['schema'] = $element['schema']; - }*/ - if (isset($element['inheritanceType'])) { $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType']))); diff --git a/tests/Doctrine/Tests/Models/DDC2825/ExplicitSchemaAndTable.php b/tests/Doctrine/Tests/Models/DDC2825/ExplicitSchemaAndTable.php new file mode 100644 index 000000000..60b5d5625 --- /dev/null +++ b/tests/Doctrine/Tests/Models/DDC2825/ExplicitSchemaAndTable.php @@ -0,0 +1,12 @@ +_em->getConnection()->getDatabasePlatform(); + + if ( ! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) { + $this->markTestSkipped("This test is only useful for databases that support schemas or can emulate them."); + } + } + + /** + * @dataProvider getTestedClasses + * + * @param string $className + * @param string $expectedSchemaName + * @param string $expectedTableName + */ + public function testClassSchemaMappingsValidity($className, $expectedSchemaName, $expectedTableName) + { + $classMetadata = $this->_em->getClassMetadata($className); + $platform = $this->_em->getConnection()->getDatabasePlatform(); + $quotedTableName = $this->_em->getConfiguration()->getQuoteStrategy()->getTableName($classMetadata, $platform); + + // Check if table name and schema properties are defined in the class metadata + $this->assertEquals($expectedTableName, $classMetadata->table['name']); + $this->assertEquals($expectedSchemaName, $classMetadata->table['schema']); + + if ($this->_em->getConnection()->getDatabasePlatform()->supportsSchemas()) { + $fullTableName = sprintf('%s.%s', $expectedSchemaName, $expectedTableName); + } else { + $fullTableName = sprintf('%s__%s', $expectedSchemaName, $expectedTableName); + } + + $this->assertEquals($fullTableName, $quotedTableName); + + // Checks sequence name validity + $this->assertEquals( + $fullTableName . '_' . $classMetadata->getSingleIdentifierColumnName() . '_seq', + $classMetadata->getSequenceName($platform) + ); + } + + /** + * @dataProvider getTestedClasses + * + * @param string $className + */ + public function testPersistenceOfEntityWithSchemaMapping($className) + { + try { + $this->_schemaTool->createSchema(array($this->_em->getClassMetadata($className))); + } catch (ToolsException $e) { + // table already exists + } + + $this->_em->persist(new $className()); + $this->_em->flush(); + $this->_em->clear(); + + $this->assertCount(1, $this->_em->getRepository($className)->findAll()); + } + + /** + * Data provider + * + * @return string[][] + */ + public function getTestedClasses() + { + return array( + array(ExplicitSchemaAndTable::CLASSNAME, 'explicit_schema', 'explicit_table'), + array(SchemaAndTableInTableName::CLASSNAME, 'implicit_schema', 'implicit_table'), + array(DDC2825ClassWithImplicitlyDefinedSchemaAndQuotedTableName::CLASSNAME, 'myschema', 'order'), + ); + } +} + +/** + * @Entity + * @Table(name="myschema.order") + */ +class DDC2825ClassWithImplicitlyDefinedSchemaAndQuotedTableName +{ + const CLASSNAME = __CLASS__; + + /** + * @Id @GeneratedValue + * @Column(type="integer") + * + * @var integer + */ + public $id; +} diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index b81b3ba1e..8a619dcf0 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -9,6 +9,8 @@ use Doctrine\Tests\Models\Company\CompanyFlexContract; use Doctrine\Tests\Models\Cache\City; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\Tests\Models\DDC2825\ExplicitSchemaAndTable; +use Doctrine\Tests\Models\DDC2825\SchemaAndTableInTableName; abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase { @@ -932,6 +934,32 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals(ClassMetadata::CACHE_USAGE_READ_ONLY, $class->associationMappings['attractions']['cache']['usage']); $this->assertEquals('doctrine_tests_models_cache_city__attractions', $class->associationMappings['attractions']['cache']['region']); } + + /** + * @group DDC-2825 + * @group 881 + */ + public function testSchemaDefinitionViaExplicitTableSchemaAnnotationProperty() + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */ + $metadata = $this->createClassMetadataFactory()->getMetadataFor(ExplicitSchemaAndTable::CLASSNAME); + + $this->assertSame('explicit_schema', $metadata->getSchemaName()); + $this->assertSame('explicit_table', $metadata->getTableName()); + } + + /** + * @group DDC-2825 + * @group 881 + */ + public function testSchemaDefinitionViaSchemaDefinedInTableNameInTableAnnotationProperty() + { + /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */ + $metadata = $this->createClassMetadataFactory()->getMetadataFor(SchemaAndTableInTableName::CLASSNAME); + + $this->assertSame('implicit_schema', $metadata->getSchemaName()); + $this->assertSame('implicit_table', $metadata->getTableName()); + } } /** diff --git a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php index e7772f189..27dda1981 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AnnotationDriverTest.php @@ -4,6 +4,8 @@ namespace Doctrine\Tests\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Events; +use Doctrine\Tests\Models\DDC2825\ExplicitSchemaAndTable; +use Doctrine\Tests\Models\DDC2825\SchemaAndTableInTableName; class AnnotationDriverTest extends AbstractMappingDriverTest { diff --git a/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php index e82be422c..598a42ce8 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php @@ -2,9 +2,7 @@ namespace Doctrine\Tests\ORM\Mapping; -use Doctrine\ORM\Mapping\ClassMetadata, - Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver, - Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\Common\Persistence\Mapping\Driver\StaticPHPDriver; class StaticPHPMappingDriverTest extends AbstractMappingDriverTest { @@ -23,4 +21,22 @@ class StaticPHPMappingDriverTest extends AbstractMappingDriverTest { $this->createClassMetadata('Doctrine\Tests\Models\DDC889\DDC889Class'); } + + /** + * @group DDC-2825 + * @group 881 + */ + public function testSchemaDefinitionViaExplicitTableSchemaAnnotationProperty() + { + $this->markTestIncomplete(); + } + + /** + * @group DDC-2825 + * @group 881 + */ + public function testSchemaDefinitionViaSchemaDefinedInTableNameInTableAnnotationProperty() + { + $this->markTestIncomplete(); + } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.php new file mode 100644 index 000000000..4a163c9bd --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.php @@ -0,0 +1,17 @@ +setPrimaryTable(array( + 'name' => 'explicit_table', + 'schema' => 'explicit_schema', +)); + +$metadata->mapField(array( + 'id' => true, + 'fieldName' => 'id', +)); + +$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_AUTO); diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.php new file mode 100644 index 000000000..045a97858 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.php @@ -0,0 +1,16 @@ +setPrimaryTable(array( + 'name' => 'implicit_schema.implicit_table', +)); + +$metadata->mapField(array( + 'id' => true, + 'fieldName' => 'id', +)); + +$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_AUTO); diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.xml new file mode 100644 index 000000000..11bb55706 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.xml new file mode 100644 index 000000000..3a89dd973 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.yml b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.yml new file mode 100644 index 000000000..f28adbb61 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.ExplicitSchemaAndTable.dcm.yml @@ -0,0 +1,8 @@ +Doctrine\Tests\Models\DDC2825\ExplicitSchemaAndTable: + type: entity + table: explicit_table + schema: explicit_schema + id: + id: + generator: + strategy: AUTO diff --git a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.yml b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.yml new file mode 100644 index 000000000..bf072816c --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.Models.DDC2825.SchemaAndTableInTableName.dcm.yml @@ -0,0 +1,7 @@ +Doctrine\Tests\Models\DDC2825\SchemaAndTableInTableName: + type: entity + table: implicit_schema.implicit_table + id: + id: + generator: + strategy: AUTO