(self,fk)
return dbkeylist
根据外键获取主键列表
根据外键获取主键列表
根据外键获取主键列表
def getAllPkByFk(self,fk):
        '''根据外键获取主键列表
        '''
        name = '%s_fk:%s'%(self._name,fk)
        fkmm = MFKMode(name)
        pklist = fkmm.get('pklist')
        if pklist is not None:
            return pklist
        props = {self._fk:fk}
        dbkeylist = util.getAllPkByFkInDB(self._name, self.pk, props)
        name = '%s_fk:%s'%(self._name,fk)
        fkmm = MFKMode(name, pklist = dbkeylist)
        fkmm.insert()
        return dbkeylist
def getAllPkByFk ( self , fk ) : name = '%s_fk:%s' % ( self . _name , fk ) fkmm = MFKMode ( name ) pklist = fkmm . get ( 'pklist' ) if pklist is not None : return pklist props = { self . _fk : fk } dbkeylist = util . getAllPkByFkInDB ( self . _name , self . pk , props ) name = '%s_fk:%s' % ( self . _name , fk ) fkmm = MFKMode ( name , pklist = dbkeylist ) fkmm . insert ( ) return dbkeylist