Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Add Model.is to compare models with each other #382

Open
wants to merge 1 commit into
base: 4.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 08-Lucid-ORM/01-Getting-Started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,14 @@ await user.reload()

NOTE: A model with properties set during a creation hook will require *reloading* to retrieve the values set during that hook.

==== is
You may need to determine if two models are the "same". This method can be used to verify that two models have the same primary key, table, and database connection:

[source, js]
----
user.is(anotherUser)
----

== Aggregate Helpers
Query Builder link:query-builder#_aggregate_helpers[aggregate helpers] provide shortcuts to common aggregate queries.

Expand Down