• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with fetching mapped entities

 
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Could you please help me to solve one JPA issue? I trying to make 1 project for learning but struck here.

I have 3 entities with OneToMany relation like below:



Now What i want is for a particular period i want to fetch all the related tags and all the related transactions. But whenever i query it always return Period and Tag but transactions is empty.

This query returns only period/tag. Transaction are empty.


But when i used join than it will fetch values in pairs

 

I want result like 1 with transactions value. Please help me.
 
Tushar Goel
Ranch Hand
Posts: 954
4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very strange it works fine for H2 database but when i use postgress it doesn't work. I only changed properties file and no other changes done
 
Water! People swim in water! Even tiny ads swim in water:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic