Skip to content

Add Model.disableRemoteMethod() - #595

Merged
ritch merged 1 commit into
masterfrom
feature/disable-remote
Oct 1, 2014
Merged

ritch merged 1 commit into
masterfrom
feature/disable-remote

Conversation

@ritch

@ritch ritch commented Sep 29, 2014

Copy link
Copy Markdown
Member

Comment thread lib/models/model.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the default value of isStatic?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not provide loopback-specific default and let strong-remoting decide?

I'd personally expect the default value should be isStatic: true.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the default as true.

edit actually this should wait for miroslav's idea to be implemented... then the default won't make sense

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that by going with false as the default, we made it impossible to implement #597 without breaking backwards compatibility :(

@bajtos

bajtos commented Sep 30, 2014

Copy link
Copy Markdown
Member

I am rather unhappy with this (name, isStatic) API:

  • the code ('find', true) is very ambiguous - what does true mean?
  • the first time I used this method, I was expecting to use ('prototype.find'), which is what we use for hooks (User.beforeRemote('prototype.*', ...)).

The fix is out of scope of this PR, see #597.

@bajtos

bajtos commented Sep 30, 2014

Copy link
Copy Markdown
Member

@ritch can you link to the strong-remoting pull request implementing the API used by this PR please?

@ritch

ritch commented Sep 30, 2014

Copy link
Copy Markdown
Member Author

@ritch can you link to the strong-remoting pull request implementing the API used by this PR please?

@bajtos added

@raymondfeng

Copy link
Copy Markdown
Member

LGTM

ritch added a commit that referenced this pull request Oct 1, 2014
@ritch
ritch merged commit 4d2ca3a into master Oct 1, 2014
@ritch ritch added #review and removed #review labels Oct 1, 2014
@ritch
ritch deleted the feature/disable-remote branch October 1, 2014 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants