async buildRelations() {
        if (utils.nonEmptyObject(this.tables)) {
            this.relations = []
            let _tables = Object.keys(this.tables).sort();
            try {
                for (let i = 0; i < _tables.length - 1; i++) {
                    var table1 = this.tables[_tables[i]];
                    for (let j = i+1; j < _tables.length; j++) {
                        var table2 = this.tables[_tables[j]];
                        let t1 = table1, t2 = table2;
                        if (table1.name.startsWith(pluralize.singular(table2.name))
                            || table1.name.endsWith(table2.name)){
                            t2 = table1;
                            t1 = table2;
                        }
                        let rel = await this.buildRelation(t1,t2);
                        this.relations.push(rel);
                    }
                }
                return true
            } catch (err) {
                console.error("Failed building relations:",err);
            }
        }
        return false

    }
/**
     * Build Relation objects between Table objects
     * @returns {Boolean} result of success task
     */
Build Relation objects between Table objects
@returns {Boolean} result of success task
Build Relation objects between Table objects @returns { Boolean } result of success task
async buildRelations() {
        if (utils.nonEmptyObject(this.tables)) {
            this.relations = []
            let _tables = Object.keys(this.tables).sort();
            try {
                for (let i = 0; i < _tables.length - 1; i++) {
                    var table1 = this.tables[_tables[i]];
                    for (let j = i+1; j < _tables.length; j++) {
                        var table2 = this.tables[_tables[j]];
                        let t1 = table1, t2 = table2;
                        if (table1.name.startsWith(pluralize.singular(table2.name))
                            || table1.name.endsWith(table2.name)){
                            t2 = table1;
                            t1 = table2;
                        }
                        let rel = await this.buildRelation(t1,t2);
                        this.relations.push(rel);
                    }
                }
                return true
            } catch (err) {
                console.error("Failed building relations:",err);
            }
        }
        return false
    }
async buildRelations ( ) { if ( utils . nonEmptyObject ( this . tables ) ) { this . relations = [ ] let _tables = Object . keys ( this . tables ) . sort ( ) ; try { for ( let i = 0 ; i < _tables . length - 1 ; i ++ ) { var table1 = this . tables [ _tables [ i ] ] ; for ( let j = i + 1 ; j < _tables . length ; j ++ ) { var table2 = this . tables [ _tables [ j ] ] ; let t1 = table1 , t2 = table2 ; if ( table1 . name . startsWith ( pluralize . singular ( table2 . name ) ) || table1 . name . endsWith ( table2 . name ) ) { t2 = table1 ; t1 = table2 ; } let rel = await this . buildRelation ( t1 , t2 ) ; this . relations . push ( rel ) ; } } return true } catch ( err ) { console . error ( "Failed building relations:" , err ) ; } } return false }
Build Relation objects between Table objects
 @returns {Boolean} result of success task
Build Relation objects between Table objects @returns { Boolean } result of success task