Posts

Showing posts with the label fluent-nhibernate

Nhibernate added duplicate column on insert

Image
Clash Royale CLAN TAG #URR8PPP Nhibernate added duplicate column on insert I'm using Fluent NHibernate. I have a class called Audit which has ItemID property. Everytime that I want to save anything in that table give me this error. Error message: The column name 'itemid' is specified more than once in the SET clause or column list of an INSERT. A column cannot be assigned more than one value in the same clause. Modify the clause to make sure that a column is updated only once. If this statement updates or inserts columns into a view, column aliasing can conceal the duplication in your code. Classes public class Audit : EntityBase { /********* ** Accessors *********/ /// <summary>When the action was logged.</summary> public virtual DateTime Date { get; set; } /// <summary>The person who triggered the action.</summary> public virtual BasicUser User { get; set; } /// <summary>The name of the related group, used for ...

Fluent Hibernate Mappings broken after Upgrade from Oracle 11 to 12 c

Image
Clash Royale CLAN TAG #URR8PPP Fluent Hibernate Mappings broken after Upgrade from Oracle 11 to 12 c I have the following mapping file: public Fabrication_TemplatesMap() { { LazyLoad(); Table("Fabrication_Templates"); Id(x => x.Fab_Tmpl_Id).GeneratedBy.Sequence("S_FAB_TMPL_ID"); Map(x => x.Fab_Tmpl_Guid); Map(x => x.Status_Id); Map(x => x.Fab_Tmpl_xml, "FAB_TMPL_XML"); References(f => f.fabricationrecord, "FAB_TMPL_ID").Cascade.None().Not.LazyLoad().ForeignKey("FAB_TMPL_ID").ReadOnly(); References(x => x._Status, "STATUS_ID").Cascade.None().Not.LazyLoad().ForeignKey("STATUS_ID").ReadOnly(); } } After the DBA updated the server to Oracle 12 c from 11 something, the mapping stopped completely working. It fills in Fab_Tmpl_Id and Fab_Tmpl_Guid, but everything else is null now. I am a...