Say I have these table in an Oracle database
Person: PersonId <- PK ID (int, from sequence) PersonFirstNameID <-- int PersonLastNameID <-- int PersonSecurityID <-- int
PersonDetails PersonFirstNameID -CompositeKey PersonLastNameID -CompositeKey PersonSecurityID -CompositeKey PersonDetailKey PersonDetailValue PersonDetailRisk
Now I want to model the one to many relation from Person to PersonDetails in NHibernate.
How can I do this? I've tried setting up a component representing the composite Id and feeding this into the one to many via the property ref however this generate SQL with duplicate columns and throws the following: System.ArgumentException: Identifier type mismatch; Found: Expected:
The NHibernate documentation talks only about doing this when the composite Id is the same on both..
Yes... Its not my DB schema, its a legacy DB and access is very limited. :(