public class Alumno extends Persona
{
private static final long serialVersionUID = -5168392367836972065L;
@ManyToOne
private Profesor tutor;
@ManyToOne
private Curso curso;
@OneToMany(mappedBy = "alumno", cascade = CascadeType.ALL,
orphanRemoval = true)
private Set<Matricula> matriculas = new HashSet<>();
我只需要发送一个json并且属性curso仅需要curso.codigo codigo是String。