0

I use new loopback, in my models.json :

"customer": { "options": { "extend": "User" }, "properties": {} }

But after run and explore, the customer model isn't extend user.

allfix
  • 52
  • 1
  • 5

1 Answers1

1

"base" should be used instead of "extend". See docs.

"user": {
  "options": {
    "base": "User",
 },
 "properties": {}
}

We could consider to support both "base" and "extend".

Raymond Feng
  • 1,516
  • 9
  • 5
  • I had to adjust like that, but still does not work. Is need to initialize the app.js? – allfix Apr 01 '14 at 12:02
  • Did you create the project using 'slc lb project' command? If so, the app.js will load models.json. Please see an example at: [https://github.com/strongloop-community/loopback-mysql-example/blob/master/models.json#L9](https://github.com/strongloop-community/loopback-mysql-example/blob/master/models.json#L9). For further questions, it's probably better to use [LoopBack mailing list](https://groups.google.com/forum/#!forum/loopbackjs). – Raymond Feng Apr 02 '14 at 05:31