You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nothing returns when used attributes with JSON field in table on MariaDB dialect #13027
I'm facing the same problem on mariadb. If I add a JSON field to the list of exluded attributes, the query returns nothing.
I digged a bit. As far I can see, the results returned by mariadb query connection, always return null for the JSON attribute, even if its not part of the Select statement od the SQL query. Somehow this break the query handler (_groupJoinData function to be more specific. This is caused by the handleJsonSelectQuery.
This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂
Activity
alexjavier15 commentedon Mar 24, 2021
I'm facing the same problem on mariadb. If I add a JSON field to the list of exluded attributes, the query returns nothing.
I digged a bit. As far I can see, the results returned by mariadb query connection, always return null for the JSON attribute, even if its not part of the Select statement od the SQL query. Somehow this break the query handler (_groupJoinData function to be more specific. This is caused by the handleJsonSelectQuery.
sequelize/src/dialects/mariadb/query.js
Lines 172 to 189 in a8b8b7f
I changed the logic to skip setting null to the JSON attribute by default in my project and worked just fine.
Check the workaround in #12583 (comment)
Process JSON fields only if actually requested - fixes sequelize#13027 …
fix(mariadb): Process JSON fields only if actually requested (sequeli…
fix(mariadb): Process JSON fields only if actually requested (sequeli…
github-actions commentedon Oct 27, 2021
This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂