小编Vin*_*ent的帖子

学说2,一对多关系OrderBy Annotations

你好我通过注释在我的一对多关系中得到了这个PHP命令

 /**
  * TaskCategory
  *
  * @Table(name="task_category")
  * @Entity(repositoryClass="models\Repositories\TaskCategoryRepository")
  */
class TaskCategory
{
 /**
  * @var array $tasks
  *
  * @OneToMany(targetEntity="Task", mappedBy="taskCategory"")
  * @OrderBy({"sort_order" = "ASC"})
  */
  private $tasks;
Run Code Online (Sandbox Code Playgroud)

我收到了这个错误:

Uncaught exception 'Doctrine\Common\Annotations\AnnotationException' with message '[Syntax Error] Expected Doctrine\Common\Annotations\Lexer::T_CLOSE_PARENTHESIS, got 'order' at position 108
Run Code Online (Sandbox Code Playgroud)

有人有类似问题吗?任何建议将不胜感激.

doctrine-orm

4
推荐指数
1
解决办法
5231
查看次数

标签 统计

doctrine-orm ×1