Skip to content

[5.x] Remove dependency on product model#57

Merged
royduin merged 2 commits intomasterfrom
feature/use-with-only
Mar 10, 2026
Merged

[5.x] Remove dependency on product model#57
royduin merged 2 commits intomasterfrom
feature/use-with-only

Conversation

@Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Mar 6, 2026

Using ->withOnly([]) on the product relation mostly did the trick, however this did not take care of any extra relations that may be added using global scopes. This gave me two other options to choose from:

  • Make a "base" product model in the Rapidez core which can be used for things like this
  • Factor out the need of using the product model at all

As it turned out, we only used the product model in this package to retrieve the SKU. This made the second option especially appealing for me in this case. In this PR, I've removed the product relation and kept it only as a join.

@Jade-GG Jade-GG requested review from indykoning and royduin March 6, 2026 10:31
@indykoning
Copy link
Member

I may be missing a bit of context, but aren't we using any product information to show the products currently in the wishlist?
Like price, thumbnail, or any custom values that may be useful for certain stores

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Mar 6, 2026

I may be missing a bit of context, but aren't we using any product information to show the products currently in the wishlist? Like price, thumbnail, or any custom values that may be useful for certain stores

All that data comes from ES. Any special data (like comments on individual products) come from the WishlistItem model itself. I triple checked to make sure, we don't use anything from the product model other than the SKU.

@royduin royduin merged commit 01bf8e3 into master Mar 10, 2026
1 check passed
@royduin royduin deleted the feature/use-with-only branch March 10, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants