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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:59:30+00:00 2026-05-25T16:59:30+00:00

Does nhibernate use a generic hash and equality generator (derived from primary key definitions)

  • 0

Does nhibernate use a generic hash and equality generator (derived from primary key definitions) for its identity map? That’s one way of doing it I guess. I was wondering how nhibernate went about achieving this.

Why bother? I was asked to use a database that could use nhibernate, but it is not supported by the community right now (it was in the past). Just want to hack my way forward. I may come back to this later and write that nhibernate layer / plugin, but that’s overkill and a little bit beyond my resources at this time.

After posting the question I found these refences below [1]. It’d be nice to find a book or a web post that went through the different edge cases.

reference [1]:

  • nhibernate: what are the best practices for implementing equality?

  • What is the Object Identity Problem in NHibernate?

  • http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx

  • 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-05-25T16:59:31+00:00Added an answer on May 25, 2026 at 4:59 pm

    Good identity map implementations?

    Take a look at

    • StatefulPersistenceContext
    • IdentityMap
    • SequencedHashMap

    in Nhibernate sources for a good identity map implementation.

    I was asked to use a database that could use nhibernate, but it is
    not supported by the community right now (it was in the past).

    If I understood you correctly you wanted to write your own ORM-like layer because NHibernate does not support the database you want. It can be a daunting task. You might want to look at extending NHibernate by providing your own Driver and Dialect.

    It’d be nice to find a book or a web post that went through the
    different edge cases.

    There is already a a very good description in Java Persistence with Hibernate: 9.2 Object identity and equality. And in online NHibernate docs: 4.3. Implementing Equals() and GetHashCode().

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

Sidebar

Related Questions

Internally, does NHibernate use DataSets or SqlDataReaders to access data from sql server or
Does anyone know if NHibernate supports returning output parameters from stored procedures? I've had
Currently, we use NHibernate to map business objects to database tables. Said business objects
Does anyone have a step-by-step guide on how to use nHibernate and SQLite? I
I use jqGrid to display data which is retrieved using NHibernate. jqGrid does paging
I use NHibernate 1 and have a HQL query SELECT mo FROM MyObject mo
i'm trying to upgrade an old CMS to use NHibernate and can't deter from
I would like to use NHibernate Automapper to map the following class: public class
I try to use NHibernate from IronPython. I have copied the NHibernate dependencies to
HI all, What all other libraries or frameworks we can use apart from NHIbernate?

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.