是否可以使用StrongLoop Arc在两个模型之间创建关系? [英] is it possible to use StrongLoop Arc to create a relationship between two models?

查看:85
本文介绍了是否可以使用StrongLoop Arc在两个模型之间创建关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此回送教程中,我们可以看到自己如何创建模型关系

In this loopback tutorial we can see how own can create model relationships http://docs.strongloop.com/display/public/LB/Tutorial%3A+model+relations#Tutorial:modelrelations-Createmodelrelations

在StrongLoop Arc中是否有可能?

Is the same possible in StrongLoop Arc?

谢谢

推荐答案

简短的回答是否". slc ui系统的arc分支基本上是其他各种slc cli东西(slc环回,slc运行,slc调试和slc ctl)的基于v2 GUI的版本.它的功能仍然非常有限,因此不支持(或显示)关系,其他几个模型属性(例如,自动生成)等.

The short answer is no. The arc branch of the slc ui system is basically their v2 GUI based version of the various other slc cli stuff (slc loopback, slc run, slc debug & slc ctl). It's still pretty limited in features, and thus doesn't support (or display) relations, several other model properties (e.g. auto-generate), etc.

我发现slc arc的用途非常有限.我直接为关系和属性编辑模型json文件.为了进行调试,无论如何,您都需要通过slc ctl启动服务器.为了进行验证,您必须编辑模型的.js文件等.但是,整个系统是一个移动的目标,因此,尽管我刚才说的今天是正确的,但下周可能会是另外一个故事了:).

I find slc arc to be pretty limited in its usefulness. I edit the model json files directly for relations and properties. In order to debug, you need to launch your server through slc ctl anyway. For validation you have to edit the model's .js files, etc. The entire system is a moving target, however, so while what I've just stated is true today, next week it could be a different story :).

注意:虽然在作曲家中的arc不会显示关系或它们生成的字段,但是当启动服务器时,swagger生成的api文档 会显示这些关系,它们应该像您一样工作期待.

Note: that while arc in the composer will not display relations or the fields they generate, when it launches the server, the swagger generated api docs will show those relations, and they should work as you expect.

这篇关于是否可以使用StrongLoop Arc在两个模型之间创建关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆