Why does Fluent NHibernate AutoMappings add an underscore to Id (e.g. Entity_id)? -
Highly used by unused automapings
To map it
Public Virtual Int ID {get; Set; } /*...snip..*/ Public virtual mapmarks icon map mark {get; Set; }}
for this
create table [attraction] ([id] [int] identity (1,1) no NULL, [MapMarkerIconId] [Integer] zero)
with this:
at cfg = Fluently.Configure (). Database (MsSqlConfiguration.MsSql2005.ConnectionString (connectionstring). DefaultSchema ("xxx") .mappings (m => {m.AutoMappings .Add (AutoMap.AssemblyOf & lt; partner & gt; () where (n => n.Namespace == "xxx.Core .Domain ") .meter .FluentMappings.Conventions.Add (PrimaryKey.Name.Is (X =>" ID "), DefaultLazy.Always (), ForeignKey.EndsWith (" ID "))}). Exposure configuration (C => c.SetProperty (Environment.ReleaseConnections, "on_close")) .xposeConfiguration (c => c.SetProperty (Environment.ProxyFactoryFactoryClass, typeof (ProxyFactoryFactory) .ssemblyQualifiedName)) .BuildConfiguration ();
Why get me
Server error in the '/XXX.Web' application. Invalid column name 'MapMarkerIcon_id'.
Can I use the fluentnibernate MapMarkerIconId instead of MapMarkerIcon_id?
You need an ID conference. View and
Comments
Post a Comment