Because you didn't pass the school to save()
and school currently is not related in any way with the student.
EDIT: Since you have added the relation between student and school then you probably don't map the reference between them correctly. You probably miss the cascade option (@ManyToOne(cascade=CascadeType.PERSIST)
or @ManyToOne(cascade=CascadeType.ALL)
) on school reference in Student class.