Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit b5498b41
authored
Apr 16, 2016
by
Bertola Lucas
Committed by
Jan Aagaard Meier
Apr 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] fix getting started example (#5758)
* fix example * use get method
1 parent
ecbc1839
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
docs/docs/getting-started.md
docs/docs/getting-started.md
View file @
b5498b4
...
@@ -91,14 +91,14 @@ Basically a promise represents a value which will be present at some point - "I
...
@@ -91,14 +91,14 @@ Basically a promise represents a value which will be present at some point - "I
// DON'T DO THIS
// DON'T DO THIS
user
=
User
.
findOne
()
user
=
User
.
findOne
()
console
.
log
(
user
.
name
);
console
.
log
(
user
.
get
(
'firstName'
)
);
```
```
_will never work!_
This is because
`user`
is a promise object, not a data row from the DB. The right way to do it is:
_will never work!_
This is because
`user`
is a promise object, not a data row from the DB. The right way to do it is:
```
js
```
js
User
.
findOne
().
then
(
function
(
user
)
{
User
.
findOne
().
then
(
function
(
user
)
{
console
.
log
(
user
.
name
);
console
.
log
(
user
.
get
(
'firstName'
)
);
});
});
```
```
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment