+-- | The database analogue of a 'WeatherForecastListingXml' is
+-- 'WeatherForecastListing'.
+--
+instance ToDb WeatherForecastListingXml where
+ type Db WeatherForecastListingXml = WeatherForecastListing
+
+-- | This is needed to define the 'XmlImportFk' instance for
+-- 'WeatherForecastListing'.
+--
+instance FromXmlFk WeatherForecastListingXml where
+ -- | Each 'WeatherForecastListingXml' is contained in a
+ -- 'WeatherForecast'.
+ --
+ type Parent WeatherForecastListingXml = WeatherForecast
+
+ 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
+