Relationship belongsToMany doesn't work
muratcakmakjengal opened this issue ยท 9 comments
Caching for many-to-many doesn't work yet.
Ty for answer. We are waiting new version
same for belongsTo I assume?
[2021-06-30 14:10:11] testing.ERROR: Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::cacheFor() {"exception":"[object] (BadMethodCallException(code: 0): Call to undefined method Illuminate\\Database\\Eloquent\\Relations\\BelongsTo::cacheFor() at ..../vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50)
@DeepDiver1975 I have spent a lot of time finding out what the issue was. None found. The BelongsTo
, like any other relationship that extends the Relation
class, proxies the calls to the query builder underneath. This means that it should work if all models got set properly.
@rennokki Hello, Caching for many-to-many will it come ? โ โ
@DeepDiver1975 I have spent a lot of time finding out what the issue was. None found. The
BelongsTo
, like any other relationship that extends theRelation
class, proxies the calls to the query builder underneath. This means that it should work if all models got set properly.
@rennokki THX a lot for looking into this - I finally got this working (I honestly don't remember what fixed this
Sending some virtual
@muratcakmakjengal The latest version contains it. #78, issue: #53
@DeepDiver1975 I can hear the cling sounds
By the way, documentation moved to Gitbook, and the documentation for Many-to-many flush is here: https://leqc.renoki.org/cache-tags/cache-invalidation/many-to-many-automatic-cache-invalidation