Solved the problem of conversion to hibernate