Cursor in CBI hooks?

Hi, trying to get the different changes of the user before he Saves and applies, I'm trying to use a cursor on the on_before_commit hook in my CBI.

However, I keep having nil objects... I don't know why. Is it possible to get a cursor object from a hook?
I use the following:

m.on_before_commit = function(self)
     require "luci.model.uci".cursor()   <--- empty object
   -- some stuff
end

Thanks in advance.