1. 程式人生 > >jpa 聯合查詢方法

jpa 聯合查詢方法

number rom ring ger inter 方法 ase .project ati

public interface TaskBaseline {
    String getNumber();

    String getTitle();

    String getName();

    String getProject();

    String getTest();
    //Integer  getTaskbaselineid();
}
@Query(nativeQuery = true,value = "select t.number as number, t.title as title, b.name as name ,b.project as project,tb.test as test from task t, baseline b, task_baseline tb where t.id=tb.taskid and b.id=tb.baselineid ")
    Iterable
<TaskBaseline> findAllJonin();

jpa 聯合查詢方法