Fluent Mappings Bug ??
Posted: Tue 08 Jan 2013 18:57
I generated my model from my existing database, used the Fluent template, at am getting all these errors on the Map .Defaults columns. I have this problem on all of my properties, and that's is a lot.
here is one instance of what is generated
Map(x => x.Comment)
.Column("comment")
.CustomType("String")
.Access.Property()
.Generated.Never()
.Default("create default [D_STRING_EMPTY] as ''
")
.CustomSqlType("varchar")
.Not.Nullable()
.Length(254);
Notice the line in blue, the Fluent template is reading my databaseand placing all my DEFAULT's, that I have defined in SQL Server into the .Default as a string, which is a big problem, because I don't want the default value to be that. Secondly, notice that the string is split on two lines. Compile will not allow a string split across multiple lines.
So, I hope there is a fix or this is not going to work for me. I cant just fix all the code as it is thousands of lines like this
thanks again
JAMES
here is one instance of what is generated
Map(x => x.Comment)
.Column("comment")
.CustomType("String")
.Access.Property()
.Generated.Never()
.Default("create default [D_STRING_EMPTY] as ''
")
.CustomSqlType("varchar")
.Not.Nullable()
.Length(254);
Notice the line in blue, the Fluent template is reading my databaseand placing all my DEFAULT's, that I have defined in SQL Server into the .Default as a string, which is a big problem, because I don't want the default value to be that. Secondly, notice that the string is split on two lines. Compile will not allow a string split across multiple lines.
So, I hope there is a fix or this is not going to work for me. I cant just fix all the code as it is thousands of lines like this
thanks again
JAMES