             expandedProblems.push(expandedProblem)
         @problems = expandedProblems
         return this
-        
+
 tablesSchema.methods.descendandTables = () ->
         result = [@_id]
         for table in @table

        for problem in @problems
            result.push(problem)
        result
            
            
tablesSchema.statics.findAll = ->
    @find {}
            
tablesSchema.statics.removeDuplicateChildren = () ->
        tables = await Table.findAll()
        for table in tables

    problems: [String]
    parent: String
    order: Number


parentFromParent = (level) ->
    if level == Table.main
