and create the entity files for “CertificateLogo” and “CertificateBackgrounds” which extend to “Files” entity then both associations work file.
I’m upgrading a project from cake 2 and this sort of association worked without defining propertyName or creating the entity file. is there a better way to do this. or am I doing this entirely wrong?
when i use contain association CertificateBackgrounds in query cake throws error CertificateBackgrounds entity does not exist. have not tried patch. creating an entity file allows this to work:
<?php
namespace App\Model\Entity;
class CertificateBackground extends File {}
writing it this way without creating the entity file as above
that error goes away but only one of the association works. for example in my query i contain ['CertificateBackgrounds ',‘CertificateLogo’]. only the associated certificate background is returned in the query, no certificate logo
Yes we have lot of customizations extensions to the core classes just to allow us to bring old code in without too many changes. Plan is to wipe it away after critical functions are migrated over. I’ll look through the stack. thanks again
Tried it in plain empty cake 5 app all works as expected. so not cakes fault.