CyclicReferencesAware 属性 - StackOverflow 异常
我一直在尝试通过 WCF 实现 POCO(使用实体框架 4.0) - 就像这样 - http:// /devblog.petrellyn.com/?p=278
的案例
我有很多对象 A - 对象 B 的引用列表
对于每个对象 B - refs 对象 A
我已经对此进行了调试,并且引用将永远持续下去,即
用户“joe”拥有团队集合。 Team[0] 引用了用户“joe”。 用户“joe”拥有团队集合。 Team[0] 引用了用户“joe”。
等等。我认为这里没什么特别的。虽然我想知道这是否是我的问题所在?
然而,在添加了很多博客文章中的 CyclicReferencesAware 属性后,我得到了一个新的 Stack Overflow 异常。所以这看起来仍然没有真正解决循环依赖关系。
现在没有想法了 - 有人有任何指示吗?
I've been trying to implement POCO over WCF (using Entity Framework 4.0) - just like this - http://devblog.petrellyn.com/?p=278
I have many cases of
Object A
- refs list of Object B
For each Object B
- refs Object A
I've debugged this and the reference goes on forever, i.e.
User "joe" has a collection of Teams.
Team[0] has a reference to User "joe".
User "joe" has a collection of Teams.
Team[0] has a reference to User "joe".
And so on. Nothing special here I would think. Although I'm wondering if this is where my problem is?
However after adding the much blogged CyclicReferencesAware attribute I get a new Stack Overflow exception. So this still looks like it's not really sorted out the cyclic dependencies.
Running out of ideas now - anyone got any pointers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

看来我可以白白浪费一整天的时间!
循环属性确实有效,但不适用于 WCF 测试客户端!
WcfTestClient.exe 无法处理循环引用?
将离开在这里回答肯定会在将来帮助别人。
Seems I could have wasted a full day over nothing!
The cyclic attribute does indeed work, BUT NOT WITH THE WCF TEST CLIENT!
WcfTestClient.exe not able to handle circular reference?
Will leave answer here as sure to help someone else in future.