Forums Register Login

Conditional eager fetch

+Pie Number of slices to send: Send
Hi,

I am looking for a way to fetch data with eager fetch but not all just conditional, lets say I have 3 table department, employee and address table with below relationship

one department has many employee
one employee has many address with date stayed range.

now I want fetching department, only issue I am getting its fetching all the address of employee but I want for last one year.
any way to do this.

Thanks
Prashant Saraf
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 410 times.
Similar Threads
question about Enity mapping
one to many concepts
Design question regarding managing one-to-many relationship...
inner-join?
JPA persist one-to-many relationship by non-owning side
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:15:24.