Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 映射到实体';从单个表中删除数组?_Php_Doctrine - Fatal编程技术网

Php 映射到实体';从单个表中删除数组?

Php 映射到实体';从单个表中删除数组?,php,doctrine,Php,Doctrine,我有一个计划实体: class Schedule { protected $days; } 我希望“天”是一组如下所示的日程安排日实体: class Schedule_Day { protected $start; protected $end; } schedule_name sunday_start sunday_end monday_start monday_end etc. 但是,我的数据库表如下所示: class

我有一个计划实体:

 class Schedule {

      protected $days;

 }
我希望“天”是一组如下所示的日程安排日实体:

 class Schedule_Day {

      protected $start;
      protected $end;

 }
 schedule_name
 sunday_start
 sunday_end
 monday_start
 monday_end
 etc.
但是,我的数据库表如下所示:

 class Schedule_Day {

      protected $start;
      protected $end;

 }
 schedule_name
 sunday_start
 sunday_end
 monday_start
 monday_end
 etc.

我如何设置条令将这一行映射到计划中,并将开始时间和结束时间映射到一组计划日实体?

这不是您想要的答案,但您为什么要在数据库中存储这样的信息??有“schedule\u name、day\u name(或者id和对存储days的另一个表的引用)、start和end”不是更好吗?同样从你发布的对象模型来看,我不知道你怎么知道它是在Schedule_day类中的哪一天