表名中有空格的doctrine实体,在symfony应用程序中检测差异时出现问题

qpgpyjmq  于 2021-10-10  发布在  Java
关注(0)|答案(0)|浏览(224)

表名中需要一个空格。我发现以下方法有效(注意间距):

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity()
 * @ORM\Table(" `dettagli cantieri2` ")
 */
class CommissionLine
{
}

但是,在更新模式后,不会检测到差异。也就是说跑步之后 doctrine:schema:update --dump-sql 将重新创建相同的表,就像未检测到一样。
我在跑步:

doctrine/annotations                v1.6.0 Docblock Annotations Parser
doctrine/cache                      v1.7.1 Caching library offering an object-oriented API for m...
doctrine/collections                v1.5.0 Collections Abstraction library
doctrine/common                     v2.8.1 Common Library for Doctrine projects
doctrine/dbal                       v2.7.2 Database Abstraction Layer
doctrine/doctrine-bundle            1.8.1  Symfony DoctrineBundle
doctrine/doctrine-cache-bundle      1.3.2  Symfony Bundle for Doctrine Cache
doctrine/doctrine-migrations-bundle v1.3.2 Symfony DoctrineMigrationsBundle
doctrine/inflector                  v1.3.0 Common String Manipulations with regard to casing and...
doctrine/instantiator               1.1.0  A small, lightweight utility to instantiate objects i...
doctrine/lexer                      v1.0.1 Base library for a lexer that can be used in Top-Down...
doctrine/migrations                 v1.8.1 Database Schema migrations using Doctrine DBAL
doctrine/orm                        v2.6.6 Object-Relational-Mapper for PHP

与symfony一起:

symfony/assetic-bundle     v2.8.2 Integrates Assetic into Symfony2
symfony/monolog-bundle     v3.1.2 Symfony MonologBundle
symfony/phpunit-bridge     v3.4.4 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.7.0 Symfony polyfill backporting apcu_* functions to lower PHP ver...
symfony/polyfill-intl-icu  v1.7.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.7.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.7.0 Symfony polyfill backporting some PHP 5.6+ features to lower P...
symfony/polyfill-php70     v1.7.0 Symfony polyfill backporting some PHP 7.0+ features to lower P...
symfony/polyfill-util      v1.7.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7 Symfony SwiftmailerBundle
symfony/symfony            v3.4.4 The Symfony PHP framework

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题