]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
changes to get/set default columns and column metadata
[maypole.git] / lib / Maypole.pm
index c3e3525d585c0c2422459d09c80d59bf634b0884..56c94e3748fb28fa9e92daac0f79c881662287ae 100644 (file)
@@ -35,6 +35,9 @@ The canonical example used in the Maypole documentation is the beer database:
     
     # choose a frontend, initialise the config object, and load a plugin
     use Maypole::Application qw/Relationship/;
+
+    # set everything up
+    __PACKAGE__->setup("dbi:SQLite:t/beerdb.db");
     
     # get the empty config object created by Maypole::Application
     my $config = __PACKAGE__->config;
@@ -62,8 +65,8 @@ The canonical example used in the Maypole documentation is the beer database:
         date => [ qw/date/],
     );
 
-    # set everything up
-    __PACKAGE__->setup("dbi:SQLite:t/beerdb.db");
+    # note : set up model before calling this method
+    BeerDB::Beer->required_columns([qw/name/]); 
 
     1;