+instance Child WeatherForecastListingXml where
+ -- | Each 'WeatherForecastListingXml' is contained in a
+ -- 'WeatherForecast'.
+ --
+ type Parent WeatherForecastListingXml = WeatherForecast
+
+
+-- | This is needed to define the 'XmlImportFk' instance for
+-- 'WeatherForecastListing'.
+--
+instance FromXmlFk WeatherForecastListingXml where
+ from_xml_fk fk WeatherForecastListingXml{..} =
+ WeatherForecastListing {
+ db_weather_forecasts_id = fk,
+ db_teams = xml_teams,
+ db_weather = xml_weather }
+
+-- | This allows us to insert the XML representation
+-- 'WeatherForecastListingXml' directly.
+--
+instance XmlImportFk WeatherForecastListingXml
+
+
+-- * WeatherLeague
+
+-- | XML representation of a league, as they appear in the weather
+-- documents. There is no associated database representation because
+-- the league element really adds no information besides its own
+-- (usually empty) name. Since there's exactly one league per
+-- forecast, we just store the league_name in the database
+-- representation of a forecast.
+--