@OneToMany(cascade = { CascadeType.ALL}, [color=red]fetch = FetchType.LAZY[/color] ,targetEntity = Student.class,mappedBy="classes") 红色是关键,不能忘记。