I have a legacy data base and a relation one-to-one between two tables. The thing is that relation uses two columns, not one. Is there some way to say in nhibernate that when getting a referenced entity it used two columns in join statement, not one? I have a similar table structure
TaskProgress
- ProgressId
- TaskId
- AssignmentId
- UserId
Tasks
- TaskId
- AssignmentId
- TaskName
Each task can be asigned in different assignments. That mean that unique task for task progress can be founded only by AssignmentId and TaskId fields.
I'm trying to use this:
References(x => x.Template)
.Columns()
.PropertyRef()
But can't get how to map join on multiple columns, any ideas?