mirror of
https://github.com/strapi/strapi.git
synced 2025-11-08 06:07:41 +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 => {
|
componentAttributes.forEach(name => {
|
||||||
model[name] = function relation() {
|
model[name] = function relation() {
|
||||||
return this.hasMany(joinModel).query(qb => {
|
return this.hasMany(joinModel, joinColumn).query(qb => {
|
||||||
qb.where('field', name)
|
qb.where('field', name)
|
||||||
.whereIn(
|
.whereIn(
|
||||||
'component_type',
|
'component_type',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user