+instance ToDb MLBBoxScoreMiscPitchingStatsIntentionalWalkXml where
+ -- | The database analogue of a
+ -- 'MLBBoxScoreMiscPitchingStatsIntentionalWalkXml' is a
+ -- 'MLBBoxScoreMiscPitchingStatsIntentionalWalk'.
+ --
+ type Db MLBBoxScoreMiscPitchingStatsIntentionalWalkXml =
+ MLBBoxScoreMiscPitchingStatsIntentionalWalk
+
+
+instance Child MLBBoxScoreMiscPitchingStatsIntentionalWalkXml where
+ -- | Each 'MLBBoxScoreMiscPitchingStatsIntentionalWalkXml' is
+ -- contained in (i.e. has a foreign key to) a 'MLBBoxScore'.
+ --
+ type Parent MLBBoxScoreMiscPitchingStatsIntentionalWalkXml =
+ MLBBoxScore
+
+
+instance FromXmlFk MLBBoxScoreMiscPitchingStatsIntentionalWalkXml where
+ -- | To convert an 'MLBBoxScoreMiscPitchingStatsIntentionalWalkXml'
+ -- to an 'MLBBoxScoreMiscPitchingStatsIntentionalWalk', we add the
+ -- foreign key and copy everything else verbatim.
+ --
+ from_xml_fk fk MLBBoxScoreMiscPitchingStatsIntentionalWalkXml{..} =
+ MLBBoxScoreMiscPitchingStatsIntentionalWalk {
+ dbiw_mlb_box_scores_id = fk,
+ dbiw_batter_id = xml_iw_batter_id,
+ dbiw_pitcher_id = xml_iw_pitcher_id,
+ dbiw_number_of_times_walked = xml_iw_number_of_times_walked }
+
+
+-- | This allows us to insert the XML representation
+-- 'MLBBoxScoreMiscPitchingStatsIntentionalWalkXml' directly.
+--
+instance XmlImportFk MLBBoxScoreMiscPitchingStatsIntentionalWalkXml
+
+
+
+-- * MLBBoxScoreMiscPitchingStatsHitByPitchXml
+
+data MLBBoxScoreMiscPitchingStatsHitByPitch =
+ MLBBoxScoreMiscPitchingStatsHitByPitch {
+ dbhbp_mlb_box_scores_id :: DefaultKey MLBBoxScore,
+ dbhbp_batter_id :: Int,
+ dbhbp_pitcher_id :: Int,
+ dbhbp_number_of_times_hit :: Int }
+
+
+instance ToDb MLBBoxScoreMiscPitchingStatsHitByPitchXml where
+ -- | The database analogue of a
+ -- 'MLBBoxScoreMiscPitchingStatsHitByPitchXml' is a
+ -- 'MLBBoxScoreMiscPitchingStatsHitByPitch'.
+ --
+ type Db MLBBoxScoreMiscPitchingStatsHitByPitchXml =
+ MLBBoxScoreMiscPitchingStatsHitByPitch
+
+
+instance Child MLBBoxScoreMiscPitchingStatsHitByPitchXml where
+ -- | Each 'MLBBoxScoreMiscPitchingStatsHitByPitchXml' is
+ -- contained in (i.e. has a foreign key to) a 'MLBBoxScore'.
+ --
+ type Parent MLBBoxScoreMiscPitchingStatsHitByPitchXml =
+ MLBBoxScore
+
+
+instance FromXmlFk MLBBoxScoreMiscPitchingStatsHitByPitchXml where
+ -- | To convert an 'MLBBoxScoreMiscPitchingStatsHitByPitchXml'
+ -- to an 'MLBBoxScoreMiscPitchingStatsHitByPitch', we add the
+ -- foreign key and copy everything else verbatim.
+ --
+ from_xml_fk fk MLBBoxScoreMiscPitchingStatsHitByPitchXml{..} =
+ MLBBoxScoreMiscPitchingStatsHitByPitch {
+ dbhbp_mlb_box_scores_id = fk,
+ dbhbp_batter_id = xml_hbp_batter_id,
+ dbhbp_pitcher_id = xml_hbp_pitcher_id,
+ dbhbp_number_of_times_hit = xml_hbp_number_of_times_hit }
+
+
+-- | This allows us to insert the XML representation
+-- 'MLBBoxScoreMiscPitchingStatsHitByPitchXml' directly.
+--
+instance XmlImportFk MLBBoxScoreMiscPitchingStatsHitByPitchXml
+
+