我已将以下属性添加到我的一个类中:
/**
* @Exclude()
* @ORM\Column(name="emailReminderSent", type="boolean")
*/
private $emailReminderSent = false;
/**
* Set emailReminderSent
*
* @param boolean $emailReminderSent
* @return InstagramShop
*/
public function setEmailReminderSent($emailReminderSent)
{
$this->emailReminderSent = $emailReminderSent;
return $this;
}
/**
* Get emailReminderSent
*
* @return boolean
*/
public function getEmailReminderSent()
{
return $this->emailReminderSent;
}
然而,当我这样做时:
sudo php app/console doctrine:schema:update --force
它不会将emailReminderSent添加到表中。知道为什么教义是这样的吗?我已经多次尝试清除缓存,但它没有用。
我的配置看起来像这样:
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: utf8mb4
orm:
auto_generate_proxy_classes: %kernel.debug%
entity_managers:
default:
metadata_cache_driver: memcached
query_cache_driver: memcached
result_cache_driver: memcached
auto_mapping: true
filters:
softdeleteable:
class: Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter
enabled: true
答案 0 :(得分:2)
您的元数据存储在Memcached中,您是否尝试刷新它?
// Namespace\MyBundle\NamespaceMyBundle.php
public function boot()
{
\Memcached::flush();
}
答案 1 :(得分:0)
您是否更新了Resources / config / doctrine中的映射以反映这些更改?