Composite ID unmapped class problem
I want to specify the class map for 1 of the elements in composite id:
CompositeId()
开发者_如何学Python .KeyReference(x => x.User, "user_id")
.KeyProperty(x => x.Key, "user_key");
Like this one:
References(x => x.User, "user_id").Class<User>()
But I get error for unmapped class because I use interfaces. I also tried the code bellow but no luck yet:
CompositeId()
.KeyReference(x => x.User, e =>
e.Name(""user_id").EntityName("User"))
.KeyProperty(x => x.Key, "user_key");
References(x => x.User, "user_id").Class<User>()
this is the answer:
https://groups.google.com/forum/#!topic/fluent-nhibernate/AnJosrxqIo8
精彩评论