I've resolved the problem by implements Serializable
:
class A{
@ID
private Long id;
@ManyToOne
@JoinColumn(name="bid",referencedColumnName="id")
private B b;
}
class B implements Serializable{
@ID
private Long id;
@ManyToOne
@JoinColumn(name="cid", referencedColumnName="id")
private C c;
}
class C implements Serializable {
@ID
private Long id;
}
interface ARepo{
@Query("select a from A a where 1=1")
List<A> findAllA()
}
thank u guys!