如何在 MongoMapper 中使用缩写字段名
我正在使用 MongoMapper 并试图想出一种使用缩写字段名称的方法。我想将键保留为简单的英语,但将字段名称存储得很短(例如“name”映射到“_n”)。我注意到一场对话,但最终结束了(https://github.com/jnunemaker/mongomapper/pull /351),我想知道是否有人有一个如何实现这一点的例子。如果有任何反馈,我将非常感激!
I'm using MongoMapper and am trying to come up with a way to use an abbreviated field name. I want to keep the keys as plain english but have the field names stored short (e.g. "name" maps to "_n"). I noticed a conversation but it ended up closed (https://github.com/jnunemaker/mongomapper/pull/351) and I was wondering if anybody has an example of how to accomplish this. I'd be extremely grateful for any feedback!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
与该对话相关的是另一个拉取请求,#353。它还没有被撤回,但我猜它很可能会被撤回,它可能只是被维护者忘记了。
拉出后,您的案例将如下所示:
我建议在 #353 上发表评论说您正在寻找该功能。
Related to that conversation is another pull request, #353. It hasn't been pulled yet but I'm guessing it likely will be, it simply may have been forgotten by the maintainers.
When pulled, your case will look like:
I recommended leaving a comment on #353 saying that you were looking for that feature.