Tried to do save logic with preUpdate
It works with onFlush, but the code is very messy
Added command for importing sql