Simple SubSonic 3 Generation issues

subsonic3

I'm trying to do a proof of concept using SubSonic 3 but Sstraight away i'm hitting numerous errors with the generation. I started making alterations to the generator settings but that seems a little odd when I'm just trying to do a simple one to one mapping of my DB.

Firstly I found an SP that had @delagate as an SP parameter name, this was easily fixed, but should probably be in the standard templates as a user shouldn't have to make template changes for this simple an issue.

Next I found that the system choked on two tables and tried to create signatures the same
the tables where
Field
Fields

now i know SubSonix 2 had a fixPluralClassName property but buggered if I can find one in the template for SubSonic 3

Any help on that one will get me started

Best Answer

Generally 'X' and 'Datum' type appendages/substitutions happen when you have used a 'reserved' word in a column or table name. In this case 'Reserved' being a word that Subsonic doesn't like to use for data objects.

A couple of rules I follow are;

  1. Ensure both table names and column names are not 'reserved' words (ie 'Data' or 'Int' or 'Table')
  2. Ensure that each table has a primary key
  3. Don't use date and time column types as they are not supported yet (DateTime is, just not Date and Time types)
  4. Don't have a column with the same name as the table

The Subsonic FAQ might be helpful.