开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜