I have a Set defined within a class as follows:
Code:
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
@JoinColumn(name="category_id", nullable=false)
public Set<Ad> getAds()
{
return ads;
}
I would like to filter the ad's that are loaded into the set when the startDate contained in the ad is greater than todays date.
I could define a filter and enable the filter to the session however the Set is automatically generated for me and there is no session for me to enable the filter. How can I filter this Set of ads by comparing the startDate contained in the Ad class to todays date?
Any Help would be greatly appreciated!