Loopbackjs 环回插入模型及其关系数据

Loopbackjs 环回插入模型及其关系数据,loopbackjs,Loopbackjs,我试图插入一个模型(oc_产品)及其关系(oc_产品描述)数据 模型正在插入,但关系数据没有插入。我没有收到任何错误消息 我在oc_产品中的关系配置 "relations": { "ocProductDescriptions": { "type": "hasOne", "model": "oc_product_description", "foreignKey": "product_id", "options": {

我试图插入一个模型(oc_产品)及其关系(oc_产品描述)数据

模型正在插入,但关系数据没有插入。我没有收到任何错误消息

我在oc_产品中的关系配置

"relations": {
    "ocProductDescriptions": {
        "type": "hasOne",
        "model": "oc_product_description",
        "foreignKey": "product_id",
        "options": {
            "nestRemoting": true,
            "validate": true,
            "forceId": false
        }
    },
}, 
oc_product_description.js product_id字段配置

"product_id": {
    "type": "Number",
    "id": true,
    "generated": true,
    "length": null,
    "precision": 10,
    "scale": 0,
    "mysql": {
        "columnName": "product_id",
        "dataType": "int",
        "dataLength": null,
        "dataPrecision": 10,
        "dataScale": 0,
        "nullable": "N"
    }
},
创建实例的代码

app.models.oc_product.create(ocProduct, function(err, instance) {
    if (err) {
      console.log(err);
    } else {
      console.log('created');
      console.log(instance);
    }
});
记录的实例

created
    { model: '6932849427639',
    viewed: 0,
    isbn: '',
    image: '/var/www/3.0.2.0-OpenCart/products/3/npten-a18-lg.jpg',
    shipping: 1,
    manufacturer_id: 8,
    sku: 'SKU',
    upc: 'UPC',
    ean: 'EAn',
    jan: '',
    mpn: 'A18',
    price: 16.1,
    length: 99,
    width: 98,
    height: 97,
    location: 'London, Uk',
    quantity: 100,
    minimum: 1,
    subtract: 1,
    weight: 0.3,
    stock_status_id: 7,
    points: 0,
    sort_order: 3,
    weight_class_id: 1,
    length_class_id: 1,
    status: 1,
    tax_class_id: 9,
    date_available: 2018-08-30T05:55:05.000Z,
    date_added: 2018-08-30T05:55:05.000Z,
    date_modified: 2018-08-30T05:55:05.000Z,
    ocProductDescription:
    { language_id: '1',
        name: 'Tenda A18 AC1200 Dual-Band WiFi Repeater',
        description: 'A18 is an AC1200 dual-band WiFi repeater dedicated for two-storey houses, villas, and multi-room houses with an area over 120 square meters. It offers up to 300 Mbps data rate on 11n band and 867 Mbps data rate on 11ac band. With two external omni-directional antennas, A18 can provide larger WiFi coverage, as well as extreme fast data rate, satisfying applications such as playback of 1080P HD videos, massively multiplayer online games, and high-speed download. With the upgrade Setup Wizard, it only takes you three steps to configure your repeater, which is easy to use. A18 also works better with other brands\' WiFi router available on the market. For whole home WiFi coverage, A18 is your best choice.<br/><br/><b>Gigabit WiFi Repeater Works Well with Optical Routers</b><br/><b>AC1200 Dual Band WiFi Repeater Tenda A18</b><br/><br/><b>Works Well with Optical Routers for Strong Wall Penetration Capacity on 5 GHz Band</b><br/>Ordinary 11AC routers performs poorly on wall penetration on 5 GHz band. With A18 to repeat 5 GHz WiFi network, data transmission rate on 5 GHz band can be up to 867 Mbps, giving a full play to your 100 Mbps optical broadband. By resolving the weakness of WiFi coverage on 5 GHz band, A18 brings you with fast internet experience at home.<br/><br/><b>Scan Quality Channel Automatically for Stable, Reliable and Fast Internet Experience</b><br/>Equipped with high quality PCB dual band antennas, the radio frequency distance between antennas of A18 has been improved to um. Each antenna provides both 2.4 GHz and 5 GHz WiFi networks, and extends WiFi networks both on 2.4 GHz and 5 GHz bands . A18 can automatically select high quality channel for you when signal fluctuates, and keeps your devices online even in the move by switching to the network with stronger signals automatically.<br/><br/><b>Visual Signal LED Guides You to Find the Best Position</b><br/>Guided by the color of Signal LED, you can easily find the best position for your repeater according to your actual network environment. Blue indicates good connection , and red indicates bad connection.<br/><br/><b>Configure Your Repeater via Smart Phones/Tablets</b><br/>Simplicity is practical. You can configure your repeater via smart phones or Tablets<br/><br/><b>Elegant and Compact Appearance</b><br/>Featured with a small size, it is easy for you to plug A18 into your electrical outlet.<br/><br/><b>One More 100 Mbps LAN port for Wired Extension</b><br/>Signal is full but the internet is still inaccessible? Want to watch online TV programs on a LCD TV with LAN port but without WiFi adapter? <br/>A18 can relieve you from these two painstaking. By connecting the Ethernet cable from your router to the LAN port of A18, you can extend your existing WiFi network in wired manner. To watch online TV programs, you just need to connect the LAN port of A18 that has extended successfully to the LAN port of your LCD TV.<br/><br/><b>More functions</b><br/>Hide SSID, Extend your existing WiFi network via WPS button, Mix WPA/WPA2 encryption mode<br/>- Hide SSID<br/>- WPS Function<br/>- Encryption Mode<br/><br/><b>Port</b><br/>1 x 10/100 Mbps RJ45<br/><br/><b>Buttons</b><br/>Reset<br/>WPS<br/><br/><b>LED</b><br/>1 x Signal LED<br/>1 x WPS LED<br/>1 x Power LED<br/><br/><b>Power Supply</b><br/>9V 0.8A, built-in<br/><br/><b>Plug Types</b><br/>National Standard, US Standard, European Standard, UK Standard, Brazil Standard<br/><br/><b>Power Consumption</b><br/>No-load: 2.8W, Full-load: 5.2W<br/><br/><b>Dimension</b><br/>80 x 58 x 48 mm<br/><br/><b>Standard & Protocol</b><br/>IEEE 802.11a, IEEE 802.11n, and IEEE 802.11ac wave2 on 5 GHz<br/>IEEE 802.11b, IEEE 802.11g, and IEEE 802.11n on 2.4 GHz<br/><br/><b>Data Rate</b><br/>802.11b: 11 Mbps<br/>802.11g: 54 Mbps<br/>802.11n: 300 Mbps<br/>802.11ac: 867 Mbps<br/><br/><b>Frequency Band</b><br/>11n: 2.412-2.484 GHz<br/>11ac: 5.15-5.25 GHz<br/><br/><b>Transmit Power</b><br/>2.4 GHz: 16dBm<br/>5 GHz: 12dBm<br/><br/><b>RSSI</b><br/>2.4 GHz:<br/>11b-1M:-97dBm<br/>11g-54M:-76dBm<br/>11n-20M-MCS7:-74dBm<br/>11n-40M-MCS7:-72dBm<br/>5 GHz:<br/>11a-6M:-95dBm<br/>11n-20M-MCS7:-74dBm<br/>11n-40M-MCS7:-72dBm<br/>11ac-80M-MCS9:-63dBm<br/><br/><b>Antenna</b><br/>2 x External 2dBi dual-band omni-directional antenna (non-detachable)<br/><br/><b>Channel</b><br/>11n: 20/40MHz by default<br/>11ac: 80MHz by default<br/><br/><b>Operating Mode</b><br/>Repeater Mode<br/>AP Mode<br/><br/><b>Wireless Security</b><br/>Default encryption mode: Mix WPA-PSK/WPA2-PSK<br/>WPA algorithm: TKIP<br/><br/><b>DHCP Server</b><br/>Supported<br/><br/><b>System Tool</b><br/>Firmware upgrade, Restore factory settings, Login password, and Reboot<br/><br/><b>Temperature</b><br/>Operating temperature:0ºC~40ºC<br/>Storage temperature:-40ºC~70&#8451;<br/>HumidityOperating humidity:(10  90)% RH, non-condensing<br/>Storage temperature:5%~90%RH, non-condensing<br/><br/><b>Package Content</b><br/>1 x AC1200 Dual Band WiFi Repeater<br/>1 x Quick Installation Guide',
        tag: 'tag',
        meta_title: 'meta tag title',
        meta_description: 'Meta Tag Description',
        meta_keyword: 'Meta Tag Keywords' },
    product_id: 4 }
已创建
{型号:'6932849427639',
浏览人数:0,
isbn:“,
图片:'/var/www/3.0.2.0-OpenCart/products/3/npten-a18-lg.jpg',
航运:1,
制造商编号:8,
sku:“sku”,
upc:“upc”,
ean:‘ean’,
一月:'',
mpn:'A18',
价格:16.1,
长度:99,
宽度:98,
身高:97,
地点:英国伦敦,
数量:100,
最低限额:1,
减:1,
重量:0.3,
库存状态标识:7,
分数:0,,
排序顺序:3,
重量等级id:1,
长度等级id:1,
现状:1,
税务类别识别号:9,
可用日期:2018-08-30T05:55:05.000Z,
添加日期:2018-08-30T05:55:05.000Z,
修改日期:2018-08-30T05:55:05.000Z,
ocProductDescription:
{语言id:'1',
名称:“天达A18 AC1200双频WiFi中继器”,
描述:“A18是一款AC1200双频WiFi中继器,专用于面积超过120平方米的两层住宅、别墅和多房间住宅。它在11n频段上提供高达300 Mbps的数据速率,在11ac频段上提供867 Mbps的数据速率。通过两个外部全向天线,A18可以提供更大的WiFi覆盖范围,以及极快的数据传输高速度、令人满意的应用程序,如播放1080P高清视频、大型多人在线游戏和高速下载。使用升级设置向导,只需三步即可配置中继器,使用方便。A18还可以更好地与市场上其他品牌的WiFi路由器配合使用。对于整个家庭WiFi覆盖,A18是您的最佳选择。

千兆位WiFi中继器与光学路由器配合使用
AC1200双频WiFi中继器Tenda A18

与光学路由器配合使用,可在5 GHz频段上提供强大的穿墙能力
普通11AC路由器在5 GHz频段上的穿墙性能较差。使用A18,可重复5 GHz WiFi网络,数据传输5 GHz频段的传输速率可高达867 Mbps,充分发挥您的100 Mbps光宽带。通过解决5 GHz频段WiFi覆盖的薄弱环节,A18为您在家中带来快速互联网体验。


自动扫描优质频道,获得稳定、可靠和快速的互联网体验
配备优质PCB双频天线,A18天线之间的射频距离已提高到um。每根天线提供2.4 GHz和5 GHz WiFi网络,并扩展2.4 GHz和5 GHz频段的WiFi网络。A18可以在信号波动时自动为您选择高质量通道,并使您的设备即使在移动过程中也保持在线自动切换到信号较强的网络。


可视信号LED引导您找到最佳位置
根据信号LED的颜色,您可以根据实际网络环境轻松找到中继器的最佳位置。蓝色表示连接良好,红色表示连接不良。

gure通过智能手机/平板电脑配置中继器
简单实用。您可以通过智能手机或平板电脑配置中继器


外观优雅紧凑
具有体积小、易于将A18插入电源插座的特点。

一个用于有线扩展的100 Mbps LAN端口
信号已满,但iInternet仍然无法访问?想在带有LAN端口但没有WiFi适配器的LCD电视上观看在线电视节目吗?
A18可以让您摆脱这两个麻烦。通过将路由器的以太网电缆连接到A18的LAN端口,您可以有线方式扩展现有的WiFi网络。要观看在线电视节目,您只需将已成功扩展的A18 LAN端口连接到液晶电视的LAN端口。

更多功能
隐藏SSID,通过WPS按钮扩展现有WiFi网络,混合WPA/WPA2加密模式
-隐藏SSID
-WPS功能
-加密模式
ED
1个信号LED
1个WPS LED
1个电源LED

9V 0.8A,内置

插头类型
国家标准、美国标准、欧洲标准、英国标准、巴西标准
功耗
空载:2.8W,满载:5.2W
尺寸
80 x 58 x 48 mm
IEEE 802.11标准和协议
a、 IEEE 802.11n和IEEE 802.11ac wave2在5 GHz上
IEEE 802.11b、IEEE 802.11g和IEEE 802.11n在2.4 GHz上



,并重新启动

温度
工作温度:0ºC~40ºC
存储温度:-40ºC~70℃;
湿度操作湿度:(10 90)%RH,非冷凝
存储温度:5%~90%RH,非冷凝

包装内容
1台AC1200双频WiFi中继器
1台Quick Insta