HasManyThrough 与 MappedManyToMany 有何不同?
大多数关于多对多关系文档的 lift-mapper 文档使用 MappedManyToMany 用于映射关系。但在探索 Lift 中,我看到了这一点作者使用 HasManyThrough 代替。
两者有什么区别?其中一个比另一个更受青睐吗?
Most of the lift-mapper documentation on many-to-many relationships documents the use of MappedManyToMany for mapping the relationship. But in in Exploring Lift, I see that the authors use HasManyThrough instead.
What's the difference between the two? Is one preferred over the other?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
HasManyThrough
get
来获取MappedManyToMany
句柄写入
+=
和-=
添加和删除对象)至少这些是我的区别在我的项目中从
HasManyThrough
移动到MappedManyToMany
时注意到。因此,我认为 MappedManyToMany 是一个新版本,并且是首选版本,而出于兼容性原因,可能会保留 HasManyThrough。
HasManyThrough
get
on it to get the elementsMappedManyToMany
+=
and-=
)At least these are the differences I noticed when moving from
HasManyThrough
toMappedManyToMany
in my project.So I think
MappedManyToMany
is a new version and is the preferred one, whileHasManyThrough
is propably kept for compatibility reasons.