Hello group,
Is the issue 6115 Fixed in GWT 2.5 or not??
http://code.google.com/p/google-web-toolkit/issues/detail?id=6115
My problem is that on a entity with recursive relation the ancestors are
not loaded when calling with(ancestors).
Here is my code:
@Entity
public class *JobCategory *{
// -- Recursive Relation mainCategory - SubCategories
@*OneToMany*(mappedBy = "mainCategory", cascade = CascadeType.ALL)
private Set<*JobCategory*> *subCategories *= new HashSet<JobCategory>();
@ManyToOne
private *JobCategory *mainCategory;
... Getters / Setters
public static List<JobCategory> findAllJobCategories() {
EntityManager em = EMFService.get().createEntityManager();
try {
Query query = em.createQuery("SELECT e FROM "+
JobCategory.class.getSimpleName() + " e ORDER BY i18nKey");
return (List<JobCategory>) query.getResultList();
} catch (Exception e) {
e.printStackTrace();
} finally {
em.close();
}
return new ArrayList<JobCategory>(); // Return empty list.
}
}
When I call:
JobCategoryRequest jobCategoryReq =
this.requestFactory.jobCategoryRequest();
Request<List<JobCategoryProxy>> req =
jobCategoryReq.findAllJobCategories().with("*subCategories*");
req.fire(receiver);
... The call will return categories but without subcatgeories. (The list is
always empty).
I checked the DB, it is all fine there.
Can it be that the Bug 6115 has not been fixed, even though its status says
so, or am I doing something wrong here?
Thank you in advance:
Nermin
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.