Getting some errors after mapping the joining table. It is for whatever
reason looking for a column i.e. vehiclereg0_.vehicleregistration_id, vreg
being object 'table'. The base model Id property should be this:
Id(x => x.Id)
.Column(nameof(ModelBase.Id))
.Not.Nullable()
.GeneratedBy.GuidComb();
Not sure why the joining is trying to label it "vehicleregistration_id"
that is definitely incorrect.
How to persuade NH? Fluent NH? How to map it correctly?
The only columns that should really be mapped otherwise are:
References(x => x.Owner)
.Not.Nullable();
References(x => x.Vehicle)
.Not.Nullable();
TBD what level of inverse relationship there should be.
Note, vehicle can only be registered to one player at a time, so perhaps
M2M is overkill.
Thoughts?
Thank you...
On Wednesday, October 1, 2025 at 6:02:14 PM UTC-4 Michael W Powell wrote:
> Hello,
>
> I want to map a joining table between A and B. I have a sense how to map
> the A and B sides of the relationship, one of which I think should be
> .Inverse(), yes?
>
> I am not hundred percent positive, but I may need to attach additional
> properties than just linking A to B and vice versa.
>
> So I need to introduce a map for the joining table C as well. But,
> personally, I'm not quite sure how that would work.
>
> Any insights?
>
> Best, thank you...
>
> Michael W. Powell
>
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/fluent-nhibernate/c12980a9-0a41-4eaf-991a-5926fe519fddn%40googlegroups.com.