天蓬老师2017-04-18 10:07:11
Record the class it belongs to in Student
类里面增加classId
, and assign a value to tell the student which class it belongs to when creating the student instance. Knowing that the student will naturally know the class.
If the data volume is several thousand, it is better to use the database directly