Skip to content

Commit

Permalink
fix: do not compare document source, they may have attributes dinamic…
Browse files Browse the repository at this point in the history
…ally generated
  • Loading branch information
marcosgz committed Aug 19, 2024
1 parent e2e3b62 commit 27b8491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/esse/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def ignore_on_delete?
end

def eql?(other, match_lazy_doc_header: false)
if match_lazy_doc_header && other.is_a?(LazyDocumentHeader)
if match_lazy_doc_header
other.eql?(self)
else
other.is_a?(Esse::Document) && (
id.to_s == other.id.to_s && type == other.type && routing == other.routing && meta == other.meta && source == other.source
id.to_s == other.id.to_s && type == other.type && routing == other.routing && meta == other.meta
)
end
end
Expand Down

0 comments on commit 27b8491

Please sign in to comment.