Hello,
I have got a problem with lazy load. I have a test web application. In a very simple servlet I want to search for all objects of a specific EJB via the local interface:
Here are my entity bean snippets:
@OneToMany(fetch=FetchType.LAZY,cascade=CascadeType.ALL)
@JoinColumn(name="forecast",referencedColumnName="id")
public Collection<SalesForecast> getSalesForecasts()
{
return salesForecasts;
}
/**
* @return the forecast.
*/
@ManyToOne(fetch=FetchType.LAZY,optional=false)
@JoinColumn(name="forecast",referencedColumnName="id")
public Forecast getForecast()
{
return forecast;
}
Forecast forecast : forecastManager.getAllForecasts()