def addKTable(self, ktable):
     ktableDao.add(ktable)
     # this ktable columns have to be added too
     for index, col in enumerate(ktable.columns):
         col.ktableId = ktable.id
         col.seqNumber = index
         kcolumnDao.add(col)
     
     self.conn.commit()
 def updateKTable(self, ktable):
     ktableDao.update(ktable)
     # add ktable new columns and
     # update existing ones
     for index, col in enumerate(ktable.columns):
         col.seqNumber = index
         if col.id is None:
             col.ktableId = ktable.id
             kcolumnDao.add(col)
         else:
             kcolumnDao.update(col)
     
     self.conn.commit()