• Post Reply Bookmark Topic Watch Topic
  • New Topic

Conditional eager fetch

Prashant Saraf
Ranch Hand
Posts: 57
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

Prashant Saraf
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!