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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:06:37+00:00 2026-05-14T21:06:37+00:00

i have this: <set name=Identities table=tIdentityGroups inverse=true batch-size=10 cascade=none> <cache usage=read-write /> <key column=GroupID

  • 0

i have this:

<set name="Identities" table="tIdentityGroups" inverse="true" batch-size="10" cascade="none">
      <cache usage="read-write" />
      <key column="GroupID" />
      <many-to-many class="Identity" column="IdentityId" />
</set>

and have translated it to this:

HasManyToMany<Identity>(x => x.Identities)
                .Table("tIdentityGroups")
                .ChildKeyColumn("IdentityID")
                .ParentKeyColumn("GroupID")
                .BatchSize(10)
                .Inverse()
                .Cascade.None()
                .Cache.ReadWrite();

The problem is that nothing is inserted in the tIdentityGroups table and my guess is that something is wrong with the mapping.

I dont know if the old nHibernate mapping worked before

Is there something i have done wrong with the new mapping or does the problem exist because of something else?

  • 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-14T21:06:38+00:00Added an answer on May 14, 2026 at 9:06 pm

    You are declaring it as Inverse, which means the other side of the relationship is responsible for maintaining it.

    That means you need to add your Group to the Identity‘s Groups property (which would not be Inverse) in order for the relationship to be persisted.

    If you don’t have a bidirectional relationship, remove the Inverse.

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

Sidebar

Related Questions

I have this weird gridview problem in .net, I haven't found what can be
I have a SQL Server 2005 database that stores data for multiple users. Each
I want to update a column in a table 1 to 10000 which is
Consider the following scenerio.... I have a master user MASTER. I have a test
I have an interesting problem that seems to be eluding me. Mono's xsp4 only
Update (21st Sept 2016) - Thanks to Digbyswift for commenting that this solution still
I'm using Fluent NHibernate in an attempt to improve testability and maintainability on a
I'm building a UITableView similar to iPod.app's album browsing view: I'm importing all the
I'm creating a turn and text-based strategy game in Django on Google App Engine
short story I run ./manage.py schemamigration junk_app --initial on a completely fresh django project

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.