orm: OneToOne relationship with owning side having key of inverse side broken
gist created by @Ocramius shows a reproducible case for this issue: https://gist.github.com/Ocramius/7adc2079884991122ca95a74d2eb4927
When hydrating an entity constructed as per the gist above using findOneBy
, the ORM raises a notice starting Notice: Undefined index: targetToSourceKeyColumns
. I believe the issue is not reproducible when using find
.
Unsure as to the root cause of the issue currently. Apologies for the vague description here, but @Ocramius will hopefully be able to provide more detail about this issue.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 17 (15 by maintainers)
I executed that gist (just changing the names to GH6124* to relate to this issue) and I had a different error on
master
- so probably we already fixed that notice.Basically the ORM complains that it wasn’t able to call the method
BasicEntityPersister#getCacheRegion()
because the mapping side is not cacheable. However if I enable L2C on theOwingSide
class, and also on the association, the test passes withfind()
andfindOneBy()
: https://gist.github.com/lcobucci/665d1f03d72af1c03c5e76af6d64b1d1