-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.9 #272
Conversation
- Move DataModel remoting setup into setup phase - Add a remoting type converter for DataModels - Move model tests into re-usable test utilities - Move other test utilities into new test utilities folder
…into feature/replication
creating a cache - Use the SharedClass class to build the remote connector - Change default base model from Model to DataModel - Fix DataModel errors not logging correct method names - Use the strong-remoting 1.4 resolver API to resolve dynamic remote methods (relation api) - Remove use of fn object for storing remoting meta data
Allow juggler to mix in these methods.
Test Failed. To trigger a build add comment - ".test\W+please" |
Test Failed. To trigger a build add comment - ".test\W+please" |
console.log(step.name); | ||
step(); | ||
} | ||
}, SPEED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sample app hangs after the last step was executed.
I'd say the interval should be cleared when there are no more steps to run.
I am worried about the implications of the change from The fact that you are changing base classes of built-in models like It took me some time to figure out what is the difference between Model and DataModel and I already know a lot about LoopBack internals. Regular loopback users won't be able to figure this out themselves. The document |
One more thing: I find it rather confusing that It is also changing the behaviour of existing apps, consider the following example: // mqtt is a connector sending messages to an IoT device
var mqtt = loopback.createDataSource('mqtt', { connector: 'mqtt', /* etc. */});
// Message is representing the payload to send. It does not have DAO methods.
var Message = loopback.createModel('message', /* etc. */);
Message.attachTo(mqtt); Here is my proposal:
If that's not possible, then I am afraid this change should be released as loopback 2.x. |
Another idea: for models created via |
The name |
* **Options** | ||
* | ||
* - `trackChanges` - If true, changes to the model will be tracked. **Required | ||
* for replication.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is trackChanges
used by Model
at all? Isn't it an option of DataModel
only?
Closed in favor of: #276 |
/to @raymondfeng @bajtos @crandmck
Breaking Changes
See https://github.com/strongloop/loopback/blob/1.9/CHANGES.md for my notes on breaking changes.
Should we mark these in the docs as deprecated?
Model => DataModel
Model
is now specifically for defining data structures.DataModel
is the default class forapp.model(name, ...);
andmodels.json
.Remote Methods
Remote methods no longer rely on function objects for storing meta-data. This means remoting meta-data is simple to (de)serialize. All metadata has been moved from juggler to loopback including the relations.
Types
Remote methods now define the concrete type for accepts / returns. This is required to correctly serialize models when code expects the concrete type (eg.
MyModel
) in a callback. This is to allow code like the following to work anywhere (client, server, browser, etc)Replication
This has been mostly reviewed as part of #153. End to end tests should be review and glaring issues preventing releasing 1.9.0. Minor issues can be resolved in 1.9.x.
The e2e tests could be improved quite a bit. Suggestions welcome there.
Remote Connector
This has been reworked a little, could use some second eyes. Same story here, anything major should be fixed before we release 1.9.0. Minor changes can be saved 1.9.x.
Isomorphic LoopBack
This feature was landed a while ago, overall testing strategy could use some eyes. Changes suggested here will most likely wait for 1.9.1.