Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:14:59+00:00 2026-06-13T22:14:59+00:00

It is giving me the above error for the NHibernate. I’m using VS 2010,C#,

  • 0

It is giving me the above error for the NHibernate. I’m using VS 2010,C#, Oracle 10g. I tried searching google, stackoverflow but no luck. Following files are giving me error.

The exception Could not determine type for: .....PatRegisterReferral, ...., Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, for columns: NHibernate.Mapping.Column(PATRF_ID)

NHibernate mapping for PatRegisterReferral

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="...." assembly="...">
  <class name=".......PatRegisterReferral, ....." table="......">
    <id name="Id" column="PATRF_ID" unsaved-value="0">
      <generator class="sequence" >
       <param name="sequence">PATRF_SEQ</param>
      </generator>
    </id>    
   <timestamp name="ModifyDate" column="MODIFY_DATE" generated="always" />
   <property name="CreateDate" column="CREATE_DATE" update="false" />
   <property name="CreateBy" column="CREATE_BY" update="false" />
   <property name="ModifyBy" column="MODIFY_BY" update="false" />
   <property name="EffDate" column="EFF_DATE" />
   <property name="ExpDate" column="EXP_DATE" />
   <many-to-one name="PatReferralStatus" class="PatReferralStatus">
    <column name="PATRS_CODE"></column>
   </many-to-one>      
 </class>
</hibernate-mapping>

The PatRegisterReferral class:

 public class PatRegisterReferral
 {

    private PatReferralStatus _patReferralStatus = null;

    public override int GetHashCode()
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append(this.GetType().FullName);
        sb.Append(EffDate);
        sb.Append(ExpDate);            
        if (PatReferralStatus.Id != null) sb.Append(PatReferralStatus.Id);            
        return sb.ToString().GetHashCode();
    }

    public virtual DateTime EffDate { get; set; }
    public virtual DateTime? ExpDate { get; set; }
    public virtual string CreateBy { get; set; }
    public virtual DateTime CreateDate { get; set; }
    public virtual string ModifyBy { get; set; }
    public virtual DateTime ModifyDate { get; set; }

    public virtual PatReferralStatus PatReferralStatus
    {
        get { return _patReferralStatus; }
        set { _patReferralStatus = value; }
    }
}

NHibernate mapping for PatReferralStatus

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="...." assembly="....">
 <class name="...., ...." table="...." mutable="false" batch-size="10" lazy="false">
  <id name="Id" column="PATRS_CODE" unsaved-value="0">
   <generator class="assigned"></generator>
  </id>
  <timestamp name="ModifyDate" column="MODIFY_DATE" generated="always" />
  <property name="Descrip" column="DESCRIP" />
  <property name="DescripFr" column="DESCRIP_FR" />
  <property name="EffDate" column="EFF_DATE" />
  <property name="ExpDate" column="EXP_DATE" />
  <property name="CreateBy" column="CREATE_BY" />
  <property name="CreateDate" column="CREATE_DATE" />
  <property name="ModifyBy" column="MODIFY_BY" />
  <bag name ="PatRegisterReferrals" lazy="true" cascade="all-delete-orphan" inverse="true">
   <key column="PATRS_CODE"></key>
   <one-to-many class="PatRegisterReferral"></one-to-many>      
  </bag>    
 </class>
</hibernate-mapping>

Class definition for PatReferralStatus

public class PatReferralStatus
{
    private IList<PatRegisterReferral> _patRegisterReferrals = null;

    public override int GetHashCode()
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append(this.GetType().FullName);
        sb.Append(Descrip);
        sb.Append(DescripFr);
        sb.Append(EffDate);
        sb.Append(ExpDate);
        return sb.ToString().GetHashCode();
    }

    public virtual string Descrip { get; set; }
    public virtual string DescripFr { get; set; }
    public virtual DateTime EffDate { get; set; }
    public virtual DateTime? ExpDate { get; set; }
    public virtual string CreateBy { get; set; }
    public virtual DateTime CreateDate { get; set; }
    public virtual string ModifyBy { get; set; }
    public virtual DateTime ModifyDate { get; set; }

    public virtual IList<PatRegisterReferral> PatRegisterReferrals
    {
        get { return _patRegisterReferrals; }
        set { _patRegisterReferrals = value; }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:15:00+00:00Added an answer on June 13, 2026 at 10:15 pm

    I found the solution after struggling for 2 days. The ID was defined in the base class. And the base class was using generics. I defined wrong type in the <T> for the derived class. Sorry people for taking your time. Silly me..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am declaring cg-point or rect as const it giving above error any one
select to_timestamp(trunc(state_date) || ' ' || substr(state_time,1,12),'DD-MM-YYYY HH24:MI:SS:FF3') from state_log above statement giving error
XCode is giving me the above error. This is my first experience with, what
My code gives the above error. I have tried to change it based on
I have the following C# that is giving me the error above when trying
i have a code like this, but giving error can not access protected member.
byte test[4]; memset(test,0x00,4); test[]={0xb4,0xaf,0x98,0x1a}; the above code is giving me an error expected primary-expression
I am getting the above error when i am trying this code. I tried
Google Webmaster Tools is giving me loads of crawl Errors of a certain type
Have the following select giving me the data I want, but I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.