https://www.yiibai.com/hibernate/hibernate-quick-guide.html
Be sure to read this article and the operation is complete.