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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:30:56+00:00 2026-05-15T07:30:56+00:00

I have an Nhibernate hbm that maps a many to many relationship. For database

  • 0

I have an Nhibernate hbm that maps a many to many relationship. For database simplicity it uses a where clause on the bag to filter the joining table.

this works well until I start to test and I use the hbm file to create a database from the generated schema. The root and user tags columns aren’t created.

In the hbm file how do I define these two columns so they are generated in the schema?

  • 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-15T07:30:57+00:00Added an answer on May 15, 2026 at 7:30 am

    this works for me (sorry if you don’t like attribute mapping – but I think you should get the idea). Important is specifying both columns – otherwise it included a strange column (val – something along the line – forgot the exact name) and used this instead of the ones I wanted.

    [Bag(0, Cascade = "all", Table = "item_hierarchy")]
    [Key(1, Column = "child")]
    [ManyToMany(2, ClassType = typeof(Item), Column="parent",NotFound = NotFoundMode.Ignore)]
    public virtual IList<Item> Parent { get; set; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 NHibernate entities (tables) that are in a one to many relationship.
I have the following NHibernate HBM that works as expected, but it makes my
I have a Users table and a Networks table with a many-to-many relationship between
I have a database table that includes a two bit fields: IsEvenSide and IsOddSide
I have an NHibernate query that looks like this: var query = Session.CreateQuery(@ select
I have an nHibernate query issue that looks quite straight forward, but I can't
I have a simple Nhibernate Linq query that is returning more results than expected:
I have the following XML (.hbm): <property name=Geometry column=the_geom> <type name=NHibernate.Spatial.Type.GeometryType,NHibernate.Spatial> <param name=subtype>MULTIPOLYGON</param> <param
I have inherited a bit of Java code that uses Hibernate. Some of the
I have two related objects: ProgramSession and ProgramTask, with a one-to-many relationship. A ProgramSession

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.