2014-02-19 22 views
2

我試圖讓源運行在http://eclipse.org/eclipselink/documentation/2.4/jpa/extensions/a_fetchgroup.htm使用@FetchGroup與EclipseLink的

@FetchGroup(name="names", 
    attributes={ 
     @FetchAttribute(name="firstName"), 
     @FetchAttribute(name="lastName") 
}) 


TypedQuery query = em.createQuery("SELECT e FROM Employee e", Employee.class);  
query.setHint(QueryHints.FETCH_GROUP_NAME, "names"); 

可悲的是它結束了「需要實現FetchGroupTracker」解釋。

我不知道這是真的還是我錯過了什麼。有人知道我可以在哪裏找到樣品嗎?

+0

你能告訴我們你是如何測試這段代碼的嗎?請提供堆棧跟蹤? –

回答