doctrine / commons 1.2的错误

时间:2014-02-05 22:44:58

标签: php symfony doctrine-orm doctrine

我使用Symfony 2.3并且我遇到了doctrine / commons 1.2

的问题

这是我的代码

$criteria = Criteria::create()
    ->orderBy(array("createdAt" => Criteria::DESC,'id' => Criteria::DESC))
;
return $this->my_array_collection->matching($criteria);

in doctrine / commons 1.1这是有效的

在教义/公共场合1.2不行不动...... 错误是

语法错误或访问冲突:1064 SQL语法中出错;查看与您的MySQL服务器版本对应的手册...

更新

Entity/Profile.php
    /**
     *
     * @ORM\OneToMany(targetEntity="..\Entity\NotifyBase", mappedBy="dest")
     */
    protected $my_array_collection;


Entity/NotifyBase


...
/**
 * NotifyBase
 *
 * @ORM\Table(name="my_table")
 * @ORM\InheritanceType("JOINED")
 * @ORM\DiscriminatorColumn(name="discr", type="string")
 * @ORM\DiscriminatorMap({
 *          "s"                        = "..\Entity\notifyS",
 *          "d"                        = "..\Entity\notifyD",
 *          "r"                        = "..\Entity\notifyR",
 *          "p"                        = "..\Entity\notifyP",
 * })
 * @ORM\Entity(repositoryClass="..\Entity\NotifyBaseRepository")
 */
class NotifyBase
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;


    /**
     * @ORM\ManyToOne(targetEntity="..\Entity\Profile", inversedBy="my_array_collection")
     * @ORM\JoinColumn(name="dest_id", referencedColumnName="id")
     */
    private $dest;

0 个答案:

没有答案