Mapping errors - invalid entities ? ("inversedBy" parameter set to null)

1,238 views
Skip to first unread message

Sylvain Deloux

unread,
Mar 9, 2013, 7:18:21 AM3/9/13
to sonata...@googlegroups.com
Hi,

I've got alerts (on the Symfony profiler toolbar) about invalid entities in SonataPageBundle. The given messages are :

Application\Sonata\PageBundle\Entity\Page :
  • The field Application\Sonata\PageBundle\Entity\Page#children is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Application\Sonata\PageBundle\Entity\Page#parent does not contain the required 'inversedBy=children' attribute.
  • The field Application\Sonata\PageBundle\Entity\Page#blocks is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Application\Sonata\PageBundle\Entity\Block#page does not contain the required 'inversedBy=blocks' attribute.
  • The field Application\Sonata\PageBundle\Entity\Page#sources is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Application\Sonata\PageBundle\Entity\Page#target does not contain the required 'inversedBy=sources' attribute.
Application\Sonata\PageBundle\Entity\Block : 
  • The field Application\Sonata\PageBundle\Entity\Block#children is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Application\Sonata\PageBundle\Entity\Block#parent does not contain the required 'inversedBy=children' attribute. 

To avoid these alerts, I have to add in my *.orm.xml files the <many-to-one> nodes with the corrects inversedBy parameters, but these relations are already declared in SonataPageExtension.php
Is it the expected configuration, or is it an error ?

Thanks,
Sylvain

decid...@gmail.com

unread,
Mar 27, 2013, 4:53:28 AM3/27/13
to sonata...@googlegroups.com
Hi,

I know that it is an old post, but I have the same problem and question. Someone have the answer ?

thanks.

Cassiano Tartari

unread,
Oct 22, 2013, 9:05:21 AM10/22/13
to sonata...@googlegroups.com
Same here, trying to fix.

Hannah Carter

unread,
Oct 22, 2013, 9:30:25 AM10/22/13
to sonata...@googlegroups.com
Are you sure your entities have the correct mappedBy/inversedBy attributes?

Hannah

Cassiano Tartari

unread,
Oct 22, 2013, 9:33:07 AM10/22/13
to sonata-users
I've just downloaded the sandbox like the instructions from: https://github.com/sonata-project/sandbox


--
You received this message because you are subscribed to the Google Groups "sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonata-users...@googlegroups.com.
To post to this group, send email to sonata...@googlegroups.com.
Visit this group at http://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages