update 5.2.5-to-5.3.6 breaks loadParentNameField

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • micha-nerdlichter
    Junior Member
    • Sep 2017
    • 8

    update 5.2.5-to-5.3.6 breaks loadParentNameField

    Hi,

    I have a custom Entity with a Parent Relation and a list view displaying the parent as link.

    Everything worked fine until I updated Espo from 5.2.5 to 5.3.6. Now the loadParentNameField function fails to load the parent's name (application/Espo/Core/ORM/Entity.php::line 51 fails, as $parentId and $parentType are both null). As soon as I load the parent's detail view and go back everything works fine again. Is this some kind of lazy loading mechanism? How can I tell the Entity to load the parent's name right away?

    Thank you, Micha
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    add to your entity service the row
    protected $forceSelectAllAttributes = true;

    Comment

    • micha-nerdlichter
      Junior Member
      • Sep 2017
      • 8

      #3
      ah, that did the job. so easy, yet so hard to find... thanks.

      Comment

      Working...