+instance H.HVector MLBBoxScoreGameBreakdownXml
+
+
+-- | The leading underscores prevent unused field warnings.
+--
+data MLBBoxScoreHomerunStatsListingBatter =
+ MLBBoxScoreHomerunStatsListingBatter {
+ _db_batter_first_name :: String,
+ _db_batter_last_name :: String,
+ _db_batter_rbis :: Int,
+ _db_batter_id :: Int }
+ deriving (Data, Eq, GHC.Generic, Show, Typeable)
+
+-- | For 'H.convert'
+--
+instance H.HVector MLBBoxScoreHomerunStatsListingBatter
+
+
+data MLBBoxScoreHomerunStatsListing =
+ MLBBoxScoreHomerunStatsListing {
+ db_mlb_box_scores_id :: DefaultKey MLBBoxScore,
+ db_batter :: MLBBoxScoreHomerunStatsListingBatter, -- embedded
+ db_season_homeruns :: Int }
+
+data MLBBoxScoreHomerunStatsListingXml =
+ MLBBoxScoreHomerunStatsListingXml {
+ xml_batter :: MLBBoxScoreHomerunStatsListingBatter,
+ xml_season_homeruns :: Int,
+ xml_pitchers :: [MLBBoxScoreHomerunStatsListingPitcherXml] }
+ deriving (Eq, GHC.Generic, Show)
+
+-- | For 'H.convert'
+--
+instance H.HVector MLBBoxScoreHomerunStatsListingXml
+
+instance Child MLBBoxScoreHomerunStatsListingXml where
+ -- | Each 'MLBBoxScoreHomerunStatsListingXml' is contained in (i.e. has a
+ -- foreign key to) a 'MLBBoxScore'.
+ --
+ type Parent MLBBoxScoreHomerunStatsListingXml = MLBBoxScore
+
+
+instance ToDb MLBBoxScoreHomerunStatsListingXml where
+ -- | The database representation of
+ -- 'MLBBoxScoreHomerunStatsListingXml' is
+ -- 'MLBBoxScoreHomerunStatsListing'.
+ --
+ type Db MLBBoxScoreHomerunStatsListingXml = MLBBoxScoreHomerunStatsListing
+
+instance FromXmlFk MLBBoxScoreHomerunStatsListingXml where
+ -- | To convert an 'MLBBoxScoreHomerunStatsListingXml' to an
+ -- 'MLBBoxScoreHomerunStatsListing', we add the foreign key and
+ -- drop the pitchers.
+ --
+ from_xml_fk fk MLBBoxScoreHomerunStatsListingXml{..} =
+ MLBBoxScoreHomerunStatsListing {
+ db_mlb_box_scores_id = fk,
+ db_batter = xml_batter,
+ db_season_homeruns = xml_season_homeruns }
+
+
+-- | This allows us to insert the XML representation
+-- 'MLBBoxScoreHomerunStatsListingXml' directly.
+--
+instance XmlImportFk MLBBoxScoreHomerunStatsListingXml
+
+
+-- | The leading underscores prevent unused field warnings.
+--
+data MLBBoxScoreHomerunStatsListingPitcher =
+ MLBBoxScoreHomerunStatsListingPitcher {
+ _db_mlb_box_score_homerun_stats_listings_id ::
+ DefaultKey MLBBoxScoreHomerunStatsListing,
+ _db_homeruns_off_pitcher :: Int,
+ _db_pitcher_first_name :: String,
+ _db_pitcher_last_name :: String,
+ _db_pitchers_pitcher_id :: Int }
+ deriving ( GHC.Generic )
+
+
+-- | For 'H.cons' and 'H.convert'.
+--
+instance H.HVector MLBBoxScoreHomerunStatsListingPitcher
+
+
+-- | The leading underscores prevent unused field warnings.
+--
+data MLBBoxScoreHomerunStatsListingPitcherXml =
+ MLBBoxScoreHomerunStatsListingPitcherXml {
+ _xml_homeruns_off_pitcher :: Int,
+ _xml_pitcher_first_name :: String,
+ _xml_pitcher_last_name :: String,
+ _xml_pitchers_pitcher_id :: Int }
+ deriving (Eq, GHC.Generic, Show)
+
+-- | For 'H.convert'
+--
+instance H.HVector MLBBoxScoreHomerunStatsListingPitcherXml
+
+instance Child MLBBoxScoreHomerunStatsListingPitcherXml where
+ -- | Each 'MLBBoxScoreHomerunStatsListingPitcherXml' is contained in
+ -- (i.e. has a foreign key to) a 'MLBBoxScoreHomerunStatsListing'.
+ --
+ type Parent MLBBoxScoreHomerunStatsListingPitcherXml =
+ MLBBoxScoreHomerunStatsListing
+
+
+instance ToDb MLBBoxScoreHomerunStatsListingPitcherXml where
+ -- | The database representation of
+ -- 'MLBBoxScoreHomerunStatsListingPitcherXml' is
+ -- 'MLBBoxScoreHomerunStatsListingPitcher'.
+ --
+ type Db MLBBoxScoreHomerunStatsListingPitcherXml = MLBBoxScoreHomerunStatsListingPitcher
+
+
+instance FromXmlFk MLBBoxScoreHomerunStatsListingPitcherXml where
+ -- | To convert an 'MLBBoxScoreHomerunStatsListingPitcherXml' to an
+ -- 'MLBBoxScoreHomerunStatsListingPitcher', we add the foreign key.
+ --
+ from_xml_fk = H.cons
+
+
+-- | This allows us to insert the XML representation
+-- 'MLBBoxScoreHomerunStatsListingPitcherXml' directly.
+--
+instance XmlImportFk MLBBoxScoreHomerunStatsListingPitcherXml
+