Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Debugging] introduced test case that shows join reaction counter breaks when run with count on morphables #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfunulab
Copy link
Contributor

@jfunulab jfunulab commented Oct 1, 2024

Hi @antonkomarev, this PR is to demonstrate some breaks that are happening when the joinReactionCounterOfType is called with the withCount method on morphable relations. The issue is not apparent when run in the in-memory database but when you switch to a mysql connection it shows up.

The error that shows up is
Illuminate\Database\QueryException: SQLSTATE[HY093]: Invalid parameter number (Connection: mysql, SQL: select articles.*, (select count(*) from morphable_entitieswherearticles.id=morphable_entities.morphable_idandmorphable_entities.morphable_type= 1) asmorphable_entities_count, COALESCE(reaction_like.count, 0) as reaction_like_count, COALESCE(reaction_like.weight, 0) as reaction_like_weight from articlesleft joinlove_reactant_reaction_countersasreaction_likeonreaction_like.reactant_id=articles.love_reactant_idandreaction_like.reaction_type_id= ? order byreaction_like_count asc)

@antonkomarev
Copy link
Member

@jfunulab thank you for the report. I will try to find time for research.

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.

2 participants