From 083963ec62a4979622dc93d8998262b1a7fadf99 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 20 Oct 2019 17:36:25 +0900 Subject: [PATCH] added documentation for Model.is --- 08-Lucid-ORM/01-Getting-Started.adoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/08-Lucid-ORM/01-Getting-Started.adoc b/08-Lucid-ORM/01-Getting-Started.adoc index 5727c3c..a431c6b 100644 --- a/08-Lucid-ORM/01-Getting-Started.adoc +++ b/08-Lucid-ORM/01-Getting-Started.adoc @@ -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.