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 f2eca756
authored
Mar 24, 2013
by
Sascha Depold
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixIssue494' of
git://github.com/solotimes/sequelize
into solotimes-fixIssue494
2 parents
ecd3de33
e9113f35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
lib/dao.js
spec/dao.spec.js
lib/dao.js
View file @
f2eca75
...
...
@@ -287,7 +287,10 @@ module.exports = (function() {
,
self
=
this
Utils
.
_
.
each
(
this
.
values
,
function
(
value
,
key
)
{
result
=
result
&&
(
value
==
other
[
key
])
if
(
Utils
.
_
.
isDate
(
value
)
&&
Utils
.
_
.
isDate
(
other
[
key
]))
result
=
result
&&
(
value
.
getTime
()
==
other
[
key
].
getTime
())
else
result
=
result
&&
(
value
==
other
[
key
])
})
return
result
...
...
spec/dao.spec.js
View file @
f2eca75
...
...
@@ -409,4 +409,17 @@ describe(Helpers.getTestDialectTeaser("DAO"), function() {
}.
bind
(
this
))
})
})
describe
(
'equals'
,
function
find
()
{
it
(
"can compare records with Date field"
,
function
(
done
)
{
this
.
User
.
create
({
username
:
'fnord'
}).
success
(
function
(
user1
)
{
var
query
=
{
where
:
{
username
:
'fnord'
}}
this
.
User
.
find
(
query
).
success
(
function
(
user2
)
{
expect
(
user1
.
equals
(
user2
)).
toEqual
(
true
)
done
()
}.
bind
(
this
))
}.
bind
(
this
))
})
})
})
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