Skip to content

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