Hey guys,
SubSonic 3.0.0.3 with MySQL 5.1 and the .NET Connector.
In my Settings.ttinclude file, I had this code:
string CleanUp(string tableName){
string result=tableName;
//strip blanks
result=result.Replace(" ","");
//strip the phrase "tbl_" and "view_"
result=result.Replace("tbl_","");
result=result.Replace("view_","");
//result=UppercaseFirst(result);
return result;
}
static string UppercaseFirst(string s)
{
if (string.IsNullOrEmpty(s))
{
return string.Empty;
}
char[] a = s.ToCharArray();
a[0] = char.ToUpper(a[0]);
return new string(a);
}
Which uppercased the names of the classes as well as all the fields (shouldn't it just uppercase the table name?) when running the T4 templates via the custom tool.
Now, when saving and looking at the auto incremented id of the table after save, it was always 0. After commenting out the result = UppercaseFirst(result); code (as you can see above), it worked perfectly.
While we're talking about this, I've also noticed that after saving a new object, changing some properties, and then saving again..that it does not update the row. Any ideas fellas?
Thanks guys!