]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add some more documentation to News.hs.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 14 Jan 2014 00:02:59 +0000 (19:02 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 14 Jan 2014 00:02:59 +0000 (19:02 -0500)
src/TSN/XML/News.hs

index a630ef7025cd6bbb31a4eb3a2db13253ad93687b..b9bc3df4f84b98c58f369085868987d9cbecdbe3 100644 (file)
@@ -80,7 +80,9 @@ instance XmlImport NewsTeam
 
 
 -- | Mapping between News records and NewsTeam records in the
---   database.
+--   database. We don't name the fields because we don't use the names
+--   explicitly; that means we have to give them nice database names
+--   via groundhog.
 --
 data News_NewsTeam = News_NewsTeam
                        (DefaultKey News)
@@ -111,7 +113,9 @@ instance XmlImport NewsLocation
 
 
 -- | Mapping between News records and NewsLocation records in the
---   database.
+--   database. We don't name the fields because we don't use the names
+--   explicitly; that means we have to give them nice database names
+--   via groundhog.
 --
 data News_NewsLocation = News_NewsLocation
                            (DefaultKey News)
@@ -273,9 +277,9 @@ mkPersist tsn_codegen_config [groundhog|
   constructors:
     - name: News_NewsTeam
       fields:
-        - name: news_NewsTeam0
+        - name: news_NewsTeam0 # Default created by mkNormalFieldName
           dbName: news_id
-        - name: news_NewsTeam1
+        - name: news_NewsTeam1 # Default created by mkNormalFieldName
           dbName: news_teams_id
 
 - entity: News_NewsLocation
@@ -283,9 +287,9 @@ mkPersist tsn_codegen_config [groundhog|
   constructors:
     - name: News_NewsLocation
       fields:
-        - name: news_NewsLocation0
+        - name: news_NewsLocation0 # Default created by mkNormalFieldName
           dbName: news_id
-        - name: news_NewsLocation1
+        - name: news_NewsLocation1 # Default created by mkNormalFieldName
           dbName: news_locations_id
 |]