Im getting this error:
NHibernate.MappingException: No persisters for:
I checked for typo's and all have hbm.xml file as Embedded Resource. For some reason, it is giving me this error. I have fixed the same problem before but couldn't this time. ID column is identity column which is the primary key. Here is my hbm.xml and my class file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="SEI.FLW.Fees.DataAccessTier.DurationOfAccount, SEI.FLW.Fees.DataAccessTier" table="DurationOfAccount">
<id name="iID" column="ID" type="Int32" unsaved-value="0">
<generator class="native" />
</id>
<property name="iAccountID" column="AccountID" type="String" />
<property name="iMasterID" column="MasterID" type="String" />
<property name="iDateAccountCameIn" column="DateAccountCameIn" type="DateTime" />
<property name="iDateAccountWentOut" column="DateAccountWentOut" type="DateTime" />
</class>
</hibernate-mapping>
The class file is:
Code:
/*
Insert License speil here!!!!
*/
using System;
using System.Collections;
namespace SEI.FLW.Fees.DataAccessTier
{
#region Class DurationOfAccount
/// <summary>
///
/// </summary>
[Serializable]
public sealed class DurationOfAccount
{
#region Private Members
private bool misChanged;
private bool misDeleted;
private int mID;
private string mAccountID;
private string mMasterID;
private DateTime mDateAccountCameIn;
private DateTime mDateAccountWentOut;
#endregion // End of Private Members
#region Default ( Empty ) Class Constuctor
public DurationOfAccount()
{
misChanged = false;
misDeleted = false;
mID = 0;
mAccountID = String.Empty;
mMasterID = String.Empty;
mDateAccountCameIn = DateTime.MinValue;
mDateAccountWentOut = DateTime.MinValue;
}
#endregion // End of Default ( Empty ) Class Constuctor
#region Public Accessors
#region ID
/// <summary>
///
/// </summary>
public int ID
{
get { return mID; }
set { misChanged |= (mID != value); mID = value; }
}
#endregion // End of ID
#region AccountID
/// <summary>
///
/// </summary>
public string AccountID
{
get { return mAccountID; }
set
{
if( value.Length > 12)
throw new ArgumentOutOfRangeException("Invalid value for AccountID", value, value.ToString());
misChanged |= (mAccountID != value); mAccountID = value;
}
}
#endregion // End of AccountID
#region MasterID
/// <summary>
///
/// </summary>
public string MasterID
{
get { return mMasterID; }
set
{
if( value.Length > 5)
throw new ArgumentOutOfRangeException("Invalid value for MasterID", value, value.ToString());
misChanged |= (mMasterID != value); mMasterID = value;
}
}
#endregion // End of MasterID
#region DateAccountCameIn
/// <summary>
///
/// </summary>
public DateTime DateAccountCameIn
{
get { return mDateAccountCameIn; }
set { misChanged |= (mDateAccountCameIn != value); mDateAccountCameIn = value; }
}
#endregion // End of DateAccountCameIn
#region DateAccountWentOut
/// <summary>
///
/// </summary>
public DateTime DateAccountWentOut
{
get { return mDateAccountWentOut; }
set { misChanged |= (mDateAccountWentOut != value); mDateAccountWentOut = value; }
}
#endregion // End of DateAccountWentOut
#region IsChanged
/// <summary>
/// Returns whether or not the object has changed it's values.
/// </summary>
public bool IsChanged
{
get { return misChanged; }
}
#endregion // End of HasChanged
#region IsDeleted
/// <summary>
/// Returns whether or not the object has changed it's values.
/// </summary>
public bool IsDeleted
{
get { return misDeleted; }
}
#endregion // End of IsDeleted
#endregion // End of Public Accessors
#region Internal Accessors for NHibernate
#region iID
/// <summary>
///
/// </summary>
internal int iID
{
get { return mID; }
set { mID = value; }
}
#endregion
#region iAccountID
/// <summary>
///
/// </summary>
internal string iAccountID
{
get { return mAccountID; }
set { mAccountID = value; }
}
#endregion
#region iMasterID
/// <summary>
///
/// </summary>
internal string iMasterID
{
get { return mMasterID; }
set { mMasterID = value; }
}
#endregion
#region iDateAccountCameIn
/// <summary>
///
/// </summary>
internal DateTime iDateAccountCameIn
{
get { return mDateAccountCameIn; }
set { mDateAccountCameIn = value; }
}
#endregion
#region iDateAccountWentOut
/// <summary>
///
/// </summary>
internal DateTime iDateAccountWentOut
{
get { return mDateAccountWentOut; }
set { mDateAccountWentOut = value; }
}
#endregion
#endregion // Internal Accessors for NHibernate
#region Public Functions
#region MarkAsDeleted
public void MarkAsDeleted()
{
misDeleted = true;
misChanged = true;
}
#endregion
#endregion
}
#endregion // Class DurationOfAccount
}