Hi, I have the following scenario:
- 1 zone has many countries
- 1 country has many operators
- 1 operator has many services
and I also wrote a service which I use like this:
PHP Code:
public Collection<Country> getCountriesByZone(String zone_id)
throws WsException{
// No empty id allowed
if(zone_id == null || zone_id == "")
throw new WsException("zone_id cannot be empty");
// Get the country
Zone z = zoneService.get(zone_id);
// Zone does not exist
if(z == null)
throw new WsException("Zone with id " + zone_id + " does not exsit");
// Get the countries out of the zone
Collection<Country> zc = z.getCountries();
// Return the collection
return zc;
}
and this returns me the collection of countries and for each country I also have operators and services.
how do I tell hibernate not to search partners (and therefore services)???
It has something to do with lazyloading, but I'm not sure how to configure it.
thanks!