+-- | The database analogue of a 'WeatherForecastListingXml' is
+-- 'WeatherForecastListing'.
+--
+instance ToDb WeatherForecastListingXml where
+ type Db WeatherForecastListingXml = WeatherForecastListing
+
+-- | This is needed to define the XmlImport instance for
+-- 'WeatherForecastListing'.
+--
+instance FromXmlFk WeatherForecastListingXml where
+ type Parent WeatherForecastListingXml = WeatherForecast
+
+ from_xml_fk fk WeatherForecastListingXml{..} =
+ WeatherForecastListing {
+ db_weather_forecasts_id = fk,
+ db_teams = xml_teams,
+ db_weather = xml_weather }
+
+-- | Allows us to call 'insert_xml' on the XML representation of
+-- WeatherForecastListing.
+--
+instance XmlImportFk WeatherForecastListingXml