librelist archives

« back to archive

bug...

bug...

From:
Uno Young
Date:
2012-10-24 @ 09:26
最新的bamboo中有如下bug

model.lua

- can be called by instance and class
local isUsingFulltextIndex = function (self)
        local model = self
        if isInstance(self) then model = getModelByName(self:getClassName())
end
        if bamboo.config.fulltext_index_support and rawget(model,
'__use_fulltext_index') then
                return true
        else
                return false
        end
end

local isUsingRuleIndex = function ()
        if bamboo.config.rule_index_support == false then
                return false
        end
        return true
end


local getModelByName  = bamboo.getModelByName
              -- <<<<<<<<<<<<<<<<<<<  这句该提前
local dcollector= 'DELETED:COLLECTOR'
local rule_manager_prefix = '_RULE_INDEX_MANAGER:'
local rule_query_result_pattern = '_RULE:%s:%s'   -- _RULE:Model:num
local rule_index_query_sortby_divider = ' |^|^| '
local rule_index_divider = ' ^_^ '
local Model