Skip to content

Polymorphic relationships error out when caching is enabled. #239

Closed
@smapod

Description

@smapod

I updated LMC from 0.3.6 to 0.4.14, and morph relationships broke.

Explanation:

  1. I call php artisan cache:clear to clear cache.
  2. I get products and their prices using eager-load for the first time, everything is fine.

Step 2

  1. I get other products and their prices, the query to the database is cached and not displayed in the console, of course cache doesn't have this data - relationships is not returned.

Step 3

Expecting missed query:

Query

Product model:

Product

Price model:

Price

In 0.3.6 all worked fine.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions