private function isOneToMany($primaryKey, $foreignKey, $modelTablePrimary)
    {
        if ($foreignKey->foreignField == $modelTablePrimary) {
            if ($foreignKey->localField != $primaryKey) {
                return true;
            }
        }

        return false;
    }
private function isOneToMany($primaryKey, $foreignKey, $modelTablePrimary)
    {
        if ($foreignKey->foreignField == $modelTablePrimary) {
            if ($foreignKey->localField != $primaryKey) {
                return true;
            }
        }

        return false;
    }
private function isOneToMany ( $ primaryKey , $ foreignKey , $ modelTablePrimary ) { if ( $ foreignKey -> foreignField == $ modelTablePrimary ) { if ( $ foreignKey -> localField != $ primaryKey ) { return true ; } } return false ; }
Detects if one to many relationship is there
If foreign key of table is primary key of foreign table
Also foreign key field is not primary key of this table.

@param string              $primaryKey
@param GeneratorForeignKey $foreignKey
@param string              $modelTablePrimary

@return bool
Detects if one to many relationship is there If foreign key of table is primary key of foreign table Also foreign key field is not primary key of this table .