- -- | To convert between a 'InjuriesDetailListingPlayerListingXml'
- -- and a 'InjuriesDetailListingPlayerListingXml', we do nothing.
- from_xml_fk fk InjuriesDetailListingPlayerListingXml{..} =
- InjuriesDetailListingPlayerListing {
- db_injuries_detail_listings_id = fk,
- db_player_id = xml_player_id,
- db_date = xml_date,
- db_pos = xml_pos,
- db_name = xml_name,
- db_injury = xml_injury,
- db_status = xml_status,
- db_fantasy = xml_fantasy,
- db_injured = xml_injured,
- db_type = xml_type }
-
--- | This lets us call 'insert_xml' on a
--- 'InjuriesDetailListingPlayerListingXml' without having to
--- explicitly convert it to its database analogue first.
+
+instance FromXmlFk InjuriesDetailListingPlayerListingXml where
+ -- | To construct a 'InjuriesDetailListingPlayerListing' from a
+ -- 'InjuriesDetailListingPlayerListingXml' we need to supply a
+ -- foreign key to an 'InjuriesDetailListing'.
+ --
+ from_xml_fk fk = (H.cons fk) . asCont . H.tail
+ where
+ -- Should be in the library soon.
+ asCont :: H.ContVec a -> H.ContVec a
+ asCont = id
+
+
+-- | This lets us insert the XML representation
+-- 'InjuriesDetailListingPlayerListingXml' directly.