Nhibernate: using parts of the compositeId in a ManyToOne Property?

If you are referencing the same column above twice (otherEntity_id) I've seen mappings like this to avoid this sort of error.

If you are referencing the same column above twice (otherEntity_id) I've seen mappings like this to avoid this sort of error: References(e => e. Parent). Columns("otherEntity_id", "parent_id") .Not.Update() .Not.Insert(); Also when you are running into a problem it is always helpful to show the full error message you are running into.

Nice idea, unfortunatly this prevents both columns from being inserted (checked the sql) but I need only the first one being ignored – Firo May 19 at 7:44.

I still haven't found a solution and mapped changed my model to: public class Entity { public OtherEntity Other { get; set; } // simple int to discriminate different Entity for the same OtherEntity public int Id { get; set; } public int ParentId { get; set; } }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions