I am having trouble mapping the following:
Invoice.InvoiceID == invoiceDefendant.InvoiceID
invoiceDefendant.personReferenceID == personReference.personReferenceID
personreReference.personID == personID
I know it is a long chain, it is also legacy so it can't be changed :(
I have the following CLR types: Invoice, PersonReference, Person.
I know the PersonRefernce => Person link works.
My property on Invoice is:
IList<PersonReference> Defendants.
My (current) mapping is:
<bag name="Defendants" access="property" table="invoiceDefendant">
<key column="invoiceID" />
<many-to-many column="invoiceID" class="iServe.PersonReference, iServe,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bag>
And I am getting the error: Repeated column in mapping
Which is correct. I have been banging my head trying different
FLuentNHibernate options, I know it is something stupid.
Here is my FNH mapping that is generating the above fragment (which is in
InvoiceMap):
HasManyToMany((c) => c.Defendants)
.WithParentKeyColumn("invoiceID")
.WithTableName("invoiceDefendant")
.WithChildKeyColumn("invoiceID")
.Access.AsProperty();
Can someone please help point out my error??
Many thanks.
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---