mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 19:04:38 +00:00
Add requireFetch false to all bookshelf models
This commit is contained in:
parent
380681ccd1
commit
ae3f421737
@ -14,6 +14,7 @@ const createGroupModels = async ({ model, definition, ORM, GLOBALS }) => {
|
|||||||
const joinTable = `${collectionName}_groups`;
|
const joinTable = `${collectionName}_groups`;
|
||||||
const joinColumn = `${pluralize.singular(collectionName)}_${primaryKey}`;
|
const joinColumn = `${pluralize.singular(collectionName)}_${primaryKey}`;
|
||||||
const joinModel = ORM.Model.extend({
|
const joinModel = ORM.Model.extend({
|
||||||
|
requireFetch: false,
|
||||||
tableName: joinTable,
|
tableName: joinTable,
|
||||||
group() {
|
group() {
|
||||||
return this.morphTo(
|
return this.morphTo(
|
||||||
|
|||||||
@ -382,6 +382,7 @@ module.exports = ({ models, target, plugin = false }, ctx) => {
|
|||||||
|
|
||||||
// Define new model.
|
// Define new model.
|
||||||
const options = {
|
const options = {
|
||||||
|
requireFetch: false,
|
||||||
tableName: `${definition.collectionName}_morph`,
|
tableName: `${definition.collectionName}_morph`,
|
||||||
[definition.collectionName]: function() {
|
[definition.collectionName]: function() {
|
||||||
return this.belongsTo(
|
return this.belongsTo(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user