- First commit to issue fork.
- Status changed to Needs work
about 2 months ago 2:17am 23 July 2024
This is a data loss bug in the entity system but it's hard enough to hit not to be critical. Let's have this setup: $parent->reference->entity = $child
where reference
is an entity reference field and $child
is stored already in the database.
$child
in any way
resetCache
method on the entity storage of $child
$parent->reference->referencedEntities()
. This will return $child
as it is in the database instead of the changed state.
Add EntityReferenceItem::hasEntity
much like EntityReferenceItem::hasNewEntity
and use the entity if it already is there instead of loading. This will also be a performance boost (tiny in most cases but still).
Approve, code, review, code, review, code, review etc until satisfied, commit, rejoice :D
None.
A new method on EntityReferenceItem.
Needs work
11.0 π₯
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.