Note that there are some explanatory texts on larger screens.

plurals
  1. PONo persister for: XYz Entity
    primarykey
    data
    text
    <p>I have a class for which i want to create a table in the database</p> <pre><code>namespace WCG.Data.EntityObjects { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; /// &lt;summary&gt; /// Class to access FaxHistory Table /// &lt;/summary&gt; public class FaxHistory { public virtual int Id { get; set; } // public virtual bool display { get; set; } public virtual bool IsDeleted { get; set; } [Required(ErrorMessage = "Fax History Date is required.")] [Display(Name = "Fax History Date")] public virtual DateTime FaxHistDate { get; set; } [Required(ErrorMessage = "Fax History to Text is required.")] [Display(Name = "Fax History To Text")] public virtual string FaxHistToText {get;set;} [Required(ErrorMessage = "Fax History NumText is required.")] [Display(Name = "Fax History NumText")] public virtual string FaxHistNumText {get;set;} [Required(ErrorMessage = "Fax History From Text is required.")] [Display(Name = "Fax History From Text")] public virtual string FaxHistFromText {get;set;} [Required(ErrorMessage = "Fax History ReText is required.")] [Display(Name = "Fax History ReText")] public virtual string FaxHistREText{get;set;} [Required(ErrorMessage = "Fax History CmtText is required.")] [Display(Name = "Fax History CmtText")] public virtual string FaxHistCmntText { get; set; } [Required(ErrorMessage = "Fax History Filename is required.")] [Display(Name = "Fax History Filename")] public virtual string FaxHistFilenameText { get; set;} public virtual DateTime DateCreated { get; set; } public virtual DateTime DateModified { get; set; } public virtual string CreatedBy { get; set; } public virtual string ModifiedBy { get; set; } } } </code></pre> <p>The NHibernate Mapping file is FaxHistory.hbm.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Data" namespace="WCG.Data.EntityObjects"&gt; &lt;class name="FaxHistory" table="FaxHistory"&gt; &lt;id name="Id" column="Id" type="System.Int32"&gt; &lt;generator class="identity" /&gt; &lt;/id&gt; &lt;property name="FaxHistDate" column="FaxHistDate" type="System.DateTime" /&gt; &lt;property name="FaxHistToText" column="FaxHistToText" type="System.String" insert="true" update="true"/&gt; &lt;property name="FaxHistNumText" column="FaxHistNumText" type="System.String" insert="true" update="true"/&gt; &lt;property name="FaxHistFromText" column="FaxHistFromText" type="System.String" insert="true" update="true"/&gt; &lt;property name="FaxHistREText" column="FaxHistREText" type="System.String" insert="true" update="true"/&gt; &lt;property name="FaxHistCmntText" column="FaxHistCmntText" type="System.String" insert="true" update="true"/&gt; &lt;property name="FaxHistFilenameText" column="FaxHistFilenameText" type="System.String" insert="true" update="true"/&gt; &lt;property name="DateCreated" column="DateCreated" type="System.DateTime" insert="true" update="false"/&gt; &lt;property name="DateModified" column="DateModified" type="System.DateTime" insert="true" update="true"/&gt; &lt;property name="CreatedBy" column="CreatedBy" type="System.String" insert="true" update="false"/&gt; &lt;property name="ModifiedBy" column="ModifiedBy" type="System.String" insert="true" update="true"/&gt; &lt;property name="IsDeleted" column="IsDeleted" type="System.Boolean" /&gt; &lt;/class&gt; &lt;/hibernate-mapping&gt; </code></pre> <p>But when I am trying to add or update some data into the table with the help of a form I am getting an error </p> <pre><code>No persister for: WCG.Data.EntityObjects.FaxHistory </code></pre> <p>Seen a lot of discussions over this topic but could not get any help whatsoever as I am new to <code>NHibernate</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload