在这里讲到父模型,其实就是主模型。在讲到绑定属性之前,我们先来看看主模型Student的写法。(注意这里我还是基于Student与study表)

    Student 模型

    image.png

    User控制器

    image.png