有两个实体:
A: which will auto update something on B
B
在A中有一个预更新:
@ORM\PreUpdate
public function asd()
{
foreach (\Doctrine\Repository\B::getInstance()->findxxxx($sdf) as $x)
{
$em->remove($x);
$em->flush(); *******
}
}
我跟踪了SQL日志:
Doctrine\Entity\Accommodation.php: 11
我已经在下面的链接上做了介绍,并且已经能够完成前面的步骤,但是当运行generate.php文件时,我得到了一个关于dsn的错误。是否省略了更改dsn的步骤?
-----------------------------------
error output
-----------------------------------
Fatal error: Uncaught exception 'Doctrine_Connection_Exception' with message 'You must create your Doctrine_Connection by u
我已经运行了命令composer update,然后得到了错误:
InvalidArgumentException:
传递的变量不是数组或对象,而是使用空数组。
\Doctrine\Common\Collections\ArrayCollection:277
public function getIterator()
{
return new ArrayIterator($this->elements);
}
旧方法如下所示:
public function getIterator()
{
return new ArrayIterator($this->_e
我遵循了这个页面上的所有说明:
我做了所有的事情,但是命令行接口对我不起作用
当我在终端中执行理论shell脚本时,它向我展示了这个
define('BASEPATH','.'); // mockup that this app was executed from ci ;)
chdir(dirname(__FILE__));
include('doctrine.php');
而不是实际结果:
$ cd system/application
$ ./doctrine
原则命令行接口
./doctrine build-all
./doctrine
我正在使用Symfony 3.4Flex和奏鸣曲-admin-bundle:"^3.33“和"php":"^7.0.8"...i想要在我运行时安装理论-mongodb bundle.m.
php composer.phar require sonata-project/doctrine-mongodb-admin-bundle 3.*@dev
我有这个错误
Your requirements could not be resolved to an installable set of packages.
Problem 1
当我试图在Symfony 5.1中安装时遇到了问题
$ composer require orm-fixtures --dev
Using version ^3.3 for doctrine/doctrine-fixtures-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/s
我会犯错误
in vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php (line 1611)
in vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.phpsprintf (line 1611)
in vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php->getSelectConditio
我正在使用Doctrine2管理我的数据库。当我列出所有Doctrine2命令时,我想知道为什么有两种类型的命令是相同的解释:
generate:doctrine:crud Generates a CRUD based on a Doctrine entity
generate:doctrine:entities Generates entity classes and method stubs from yourmapping information
generate:doctrine:entity Generat
我遇到了Symfony和Doctrine实体生成器的问题。
当我调用php app/console doctrine:generate:entities MyCompany时,命令失败并抛出此异常:
[InvalidArgumentException]
Command "doctrine:generate:entities" is not defined.
Did you mean one of these?
doctrine:generate:entit
注释或名称空间的路径似乎是错误的,但我不知道为什么。php bin/console doctrine:mongodb:mapping:info输出
[FAIL] AppBundle\Document\Test\Test
[Semantical Error] The annotation "@Gedmo\Mapping\Annotation\Timestampable" in property AppBundle\Document\Test\Test::$createdAt does not exist, or could not be auto-loaded.
实体文件:
&l
加载Doctrine类后,我将面临以下问题
use Doctrine\Common\ClassLoader;
require 'vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php';
$classLoader = new ClassLoader('Doctrine', 'vendor/doctrine/dbal/lib/Doctrine');
$classLoader->register();
$config = new \Doctrine\DBAL\Configura
我正在学习php和Doctrine2.2中的命名空间,为期一周。
我浏览了几个博客,并阅读了几篇关于php中命名空间的文章。
我理解,当我们想在不同的php页面中使用不同的名称空间时,我们必须编写:include('php page that belong namespace we want to use');。
但是Doctrine2.2不使用任何include、require或require_once语句来使用命名空间。Doctrine2.2中的几乎所有脚本都是这样的:
Doctrine\ORM\EntityManager.php
<?php
namespace Do
我试图更新我的层叠项目中的理论模块到版本3使用作曲家,但我得到错误。
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.5
- Conclusion: don't install doctrine/doctrine-orm-module 3.0.4
- Conclusion: don't install
我有一个使用Doctrine >=2.2.3的Symfony 2.3应用程序,<2.4-dev。我将我的生产服务器升级到PHP5.6,这导致了FOSUserBundle出现以下错误:
Warning: Erroneous data format for unserializing 'air\cms2Bundle\Entity\User' in /vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php on line 833
Fatal error: __clone method call
我对使用ZendFramework2和postgresql的控制台有问题
ricardo@notebook:/var/www/zendskeleton$ bin/doctrine-module orm:schema-tool:create
PHP Warning: array_map(): An error occurred while invoking the map callback in /var/www/zendskeleton/vendor/doctrine/doctrine-orm-module/src/DoctrineORMModule/Module.php on line 1
我在使用CodeIgniter设置Doctrine时遇到了问题。运行时出现以下错误:
Fatal error: Class 'Symfony\Component\Console\Helper\HelperSet' not found in /Applications/MAMP/htdocs/CodeIgniter-2.2.1/application/doctrine.php on line 21
文件夹结构如下所示
/application/
/application/doctrine.php
/application/libraries/
/application/libra
电脑: 2009年中Mac Book Pro和OSX Lion
您好,我的Symfony2安装目前遇到问题。
我正在和一些朋友合作一个Symfony2 collab项目,我们使用composer和git来协调我们所有的工作。这就是说,我通常使用composer来获取我需要的任何东西,没有任何问题。
然而,他们最近开始使用MongoDB,因此php使用的MongoDB扩展(和Symfony2),当我使用Composer更新时,这是控制台“吐出来的”。
composer update
Loading composer repositories with package information
Up
我尝试在Symfony 5.1项目中安装Doctrine ORM,但得到以下错误: composer require symfony/orm-pack
Using version ^1.1 for symfony/orm-pack
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfo
大家好,我正在symfony 4.1上做一个新项目,
我使用postgres 10.5作为我的SGBD。
我使用symfony的maker捆绑包创建了一个实体,现在我仍然使用该命令使用maker捆绑包进行迁移:
php bin/console make:迁移
下面是堆栈跟踪:
In Container.php line 274:
You have requested a non-existent service "doctrine". Did you mean one of these: "console.command.public_alias.doctrine