OpenJPA getSingleResult weirdness -


a have 2 entities: report , reportsection bound onetomany relation. usually, each report contains more 1 sections.

i use openjpa 2.2.1 , started encountering error when trying fetch specific report while eagerly loading sections well.

em.createnamedquery("report.findsinglewithsections").setparameter("id", id).getsingleresult(); 

where report.findsinglewithsections is:

select r report r left join r.sections s r.id = :id; 

what expect: single report object fetched , sections.

what get: nouniqueresultexception exception

i querying done via primary key, there no possibility double records exist in database.

if change getsingleresult getresultlist 1 (report -> reportsection) each pair is, far know, not correct behavior.

is known bug or doing wrong here? hint helpful


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -