mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
Merge pull request #5607 from strapi/fix/#5190/badSingularFormOfColumnNameInQuery
Fix bad singular form of column name
This commit is contained in:
commit
8aafa1b53a
@ -53,7 +53,7 @@ const createComponentModels = async ({ model, definition, ORM, GLOBALS }) => {
|
||||
|
||||
componentAttributes.forEach(name => {
|
||||
model[name] = function relation() {
|
||||
return this.hasMany(joinModel).query(qb => {
|
||||
return this.hasMany(joinModel, joinColumn).query(qb => {
|
||||
qb.where('field', name)
|
||||
.whereIn(
|
||||
'component_type',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user