I found that one of the tables of the old db that I am working on has a call called "Order". Unfortunately, I cannot change the structure of the database.
My Fluent NHibernate class looks like
public class SiteMap : AutoMap<Site> { public SiteMap() { WithTable("Sites"); Id(x => x.ID, "Id") .WithUnsavedValue(0) .GeneratedBy.Identity(); Map(x => x.Name, "Name"); //various columns mapping and then... Map(x => x.SiteOrder, "Order"); } }
I do not know if the problems are FluentNH or NHibernate, but I can confirm that the problem is the reserved name "Order".
How to solve this?
Update: as intended by inserting the [Order] form. Thanks!
But now I am only associated with SQL2005?
source share