mirror of
https://github.com/strapi/strapi.git
synced 2025-11-13 00:29:51 +00:00
Merge pull request #139 from dj-hedgehog/master
fixed missing associations
This commit is contained in:
commit
c01c910eb6
@ -218,7 +218,9 @@ module.exports = {
|
|||||||
|
|
||||||
defineAssociations: function (model, definition, association, key) {
|
defineAssociations: function (model, definition, association, key) {
|
||||||
// Initialize associations object
|
// Initialize associations object
|
||||||
definition.associations = [];
|
if (definition.associations === undefined) {
|
||||||
|
definition.associations = [];
|
||||||
|
}
|
||||||
|
|
||||||
// Exclude non-relational attribute
|
// Exclude non-relational attribute
|
||||||
if (!association.hasOwnProperty('collection') && !association.hasOwnProperty('model')) {
|
if (!association.hasOwnProperty('collection') && !association.hasOwnProperty('model')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user