core/server/models/permission.js
function permittedAttributes() {
        let filteredKeys = ghostBookshelf.Model.prototype.permittedAttributes.apply(this, arguments);

        this.relationships.forEach((key) => {
            filteredKeys.push(key);
        });

        return filteredKeys;
    }
function permittedAttributes() {
        let filteredKeys = ghostBookshelf.Model.prototype.permittedAttributes.apply(this, arguments);

        this.relationships.forEach((key) => {
            filteredKeys.push(key);
        });

        return filteredKeys;
    }
function permittedAttributes ( ) { let filteredKeys = ghostBookshelf . Model . prototype . permittedAttributes . apply ( this , arguments ) ; this . relationships . forEach ( ( key ) => { filteredKeys . push ( key ) ; } ) ; return filteredKeys ; }
The base model keeps only the columns, which are defined in the schema.
We have to add the relations on top, otherwise bookshelf-relations
has no access to the nested relations, which should be updated.
The base model keeps only the columns which are defined in the schema . We have to add the relations on top otherwise bookshelf - relations has no access to the nested relations which should be updated .