[SyliusResourceBundle] Trouble when executing commands with doctrine inheritance

81 views
Skip to first unread message

José Leonardo Diaz Ordoñez

unread,
Jul 15, 2014, 12:12:41 PM7/15/14
to syliu...@googlegroups.com
Hello good morning,
First of all sorry if this is not the place for this kind of post,


I have a weird issue with the Sylius Resource bundle I'm using it for a simple crud for a BlogBundle (for our project we must build one), so we have another bundle that uses doctrine inheritance with annotations. 

When enabling the Sylius bundle on kernel and execute a schema:update command I get the message 

[Doctrine\ORM\Mapping\MappingException]                                                                                                          
  Entity class 'IntervalConstraint' used in the discriminator map of class 'WayneFirm\ScheduleBundle\Entity\ScheduleConstraint' does not exist.

The class is there, the command also have been working fine before enabling the bundle, in fact if I disable from AppKernel it works just fine. I've been using in the project the JMSSerializerBundle and the FOSRestBundle so I dont think those are the problem.

Does anyone know or have any advice for me so I can fix that kind of trouble. Any idea where to start??

Thanks

The The scheduleConstraint class is defined as in the doctrine documentation:

----------------------------
namespace WayneFirm\ScheduleBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
**
 * @ORM\Entity()
 * @ORM\Table(name="calendar_constraint")
 * @ORM\InheritanceType("SINGLE_TABLE")
 * @ORM\DiscriminatorColumn(name="enttype", type="string")
 * @ORM\DiscriminatorMap({ "simple" = "IntervalConstraint", "daily" = "DailyConstraint" })
 */

abstract class  ScheduleConstraint  implements \JsonSerializable {
...

Classes IntervalConstraint and DailyConstraint are also there in the same package as ScheduleConstraint

--------------------------
namespace WayneFirm\ScheduleBundle\Entity;

use Doctrine\ORM\Mapping as ORM;


/**
 * @ORM\Entity()
 */

class IntervalConstraint extends ScheduleConstraint {




Thanks in advance
Reply all
Reply to author
Forward
0 new messages