Giter Site home page Giter Site logo

loopback-sandbox's Introduction

loopback-sandbox's People

Contributors

agnes512 avatar bajtos avatar dhmlau avatar shimks avatar siddhipai avatar simonhoibm avatar superkhau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

loopback-sandbox's Issues

strong-remoting -- There is no method to handle GET /Contact3126664688727987007s

Hi,

I hit by an issue for model rest api. For multi-tenant support, I dynamically created new DS, and models for every user. and plural is also different for every user. For example, user1 model rest url is like '.../api/UsersAAAAs', user2 will be '.../api/UsersBBBBBs'. One connector module is put to loopbackProj/node-modules.

When user1 and user2 both post a request to create their DS and Models (attach to their DS and APP, model only has different name and plural), user1's model rest api will not be effect, user2 model rest api can work.
For example, access user

Could you please give me any comments? Thanks very much!

Loopback 3

Add a branch (or make master) use Loopback 3.

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

Now that loopback 3 is released, would be good to have a sandbox/demo project that uses the latest and greatest.

The PersistedModel has not been correctly attached to a datasource

I am getting error: Error: Cannot call Test.create(). The create method has not been setup The PersistedModel has not been correctly attached to a datasource.

Here is my datasource.json:

{
  "db": {
    "name": "db",
    "connector": "memory"
  },
  "mongoDS": {
    "host": "localhost", 
    "port": 27017, 
    "name": "mongoDS",
    "database": "akhiltest",
    "connector": "mongodb"
  }
}

model-config.json:

{
  "_meta": {
    "sources": [
      "loopback/common/models",
      "loopback/server/models",
      "../common/models",
      "./models"
    ],
    "mixins": [
      "loopback/common/mixins",
      "loopback/server/mixins",
      "../common/mixins",
      "./mixins"
    ]
  },
  "User": {
    "dataSource": "db"
  },
  "AccessToken": {
    "dataSource": "db",
    "public": false
  },
  "ACL": {
    "dataSource": "db",
    "public": false
  },
  "RoleMapping": {
    "dataSource": "db",
    "public": false,
    "options": {
      "strictObjectIDCoercion": true
    }
  },
  "Role": {
    "dataSource": "db",
    "public": false
  },
  "Test": {
    "dataSource": "mongoDS",
    "public": true
  }
}

test.js

'use strict';

module.exports = function(Test) {
Test.create({
    "first_name":"akhil"
},function(data){
    console.log(data);
})
};

test.json

{
  "name": "Test",
  "base": "PersistedModel",
  "idInjection": true,
  "options": {
    "validateUpsert": true
  },
  "properties": {
    "first_name": {
      "type": "string"
    }
  },
  "validations": [],
  "relations": {},
  "acls": [],
  "methods": {}
}

Your help will be highly appreciated

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

Link to sample repo to reproduce issue (if bug)

Expected result

Actual result (if bug)

Additional information (Node.js version, LoopBack version, etc)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.