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 8566749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:43:36+00:00 2026-06-11T17:43:36+00:00

I’m using NHibernate with C# and at compiling time it gives me this error:

  • 0

I’m using NHibernate with C# and at compiling time it gives me this error:

 {"Could not find a getter for property 'idOrder' in class 'FrancosPoS.DBMapping.ordPsf'"}

I have found this question, but I could not get how to use it for me:
Nhibernate – Could not find a getter for property

This is my mapping class:

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping assembly="FrancosPoS" namespace="FrancosPoS.DBMapping" xmlns="urn:nhibernate-mapping-2.2">
  <class name="ordPsf" table="ord_psf" lazy="true" >
    <id name="idOrdPastaF">
      <generator class="identity" />
      <!--<column name="idOrdPastaF" sql-type="int(11)" not-null="true" />-->
    </id>
    <many-to-one insert="false" update="false" lazy="false" name="idOrder">
      <column name="idOrder" sql-type="int(11)" not-null="true" />
    </many-to-one>
    <property name="idOrder">
      <column name="idOrder" sql-type="int(11)" not-null="true" />
    </property>
    <many-to-one insert="false" update="false" lazy="false" name="idPastaF">
      <column name="idPastaF" sql-type="int(11)" not-null="true" />
    </many-to-one>
    <property name="idPastaF">
      <column name="idPastaF" sql-type="int(11)" not-null="true" />
    </property>
    .
    .
    .
    <property name="obs">
      <column name="obs" sql-type="varchar(50)" not-null="false" />
    </property>
    <property name="price">
      <column name="price" sql-type="decimal(8,4)" not-null="true" />
    </property>
  </class>
</hibernate-mapping>

And this is my cs class:

namespace FrancosPoS.DBMapping {

    public partial class ordPsf {
        public ordPsf() { }
        public virtual int idOrdPastaF { get; set; }
        public virtual order order { get; set; }
        public virtual pastaFeast pastaFeast { get; set; }
        public virtual salad salad { get; set; }
        public virtual onTheSide onTheSide { get; set; }
        public virtual string obs { get; set; }
        public virtual string price { get; set; }
    }
}

My guess is that I’m doing the mapping wrong. By obvious reasons, I don’t want to have a idOrder get/set because I need to use the object. (Besides, I’m guessing that the same error will occur at the other ids after fixing this one)

  • 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-11T17:43:37+00:00Added an answer on June 11, 2026 at 5:43 pm

    I have found that the problem is with the < property > “conflicting” with the < many-to-one > relationship:

    <property name="idOrder">
      <column name="idOrder" sql-type="int(11)" not-null="true" />
    </property>
    

    We don’t need to have this as the many-to-one will take care of the order object (and id).

    Found by looking on how to map a many-to-one relationship: http://ajlopez.wordpress.com/2011/05/19/nhibernate-3-part-6-one-to-many-with-many-to-one/

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.