@@ -139,9 +139,9 @@ class YourRepository extends Repository {
139139## Retrieving and Persisting Data
140140
141141### ` find`
142- Find entities
142+ Find entities matched by the filter, or empty array ` [] ` if there is no matching entity.
143143
144- Format: ` .find(options)` where ` options` is a optional object containing ` { limit, offset, orderBy, conditions }`
144+ Format: ` .find(options)` where ` options` is a optional object containing ` { limit, offset, orderBy, where }`
145145
146146Return: Entity array
147147
@@ -181,12 +181,12 @@ const repo = new ItemRepository(injection)
181181const ret = await repo.find({ orderBy: [{ column: 'nome', order: 'desc' }, 'email'] })
182182` ` `
183183
184- - ` conditions `
184+ - ` where `
185185Adds a filter to the query with given values.
186186
187187` ` ` javascript
188188const repo = new ItemRepository(injection)
189- const ret = await repo.find({ conditions : { name: ["Anne"] } })
189+ const ret = await repo.find({ where : { name: ["Anne"] } })
190190` ` `
191191
192192### ` findByID`
@@ -201,6 +201,18 @@ const repo = new ItemRepository(injection)
201201const ret = await repo.findByID(10)
202202` ` `
203203
204+ ### ` first`
205+ Finds the first entity matched by the filter, or empty array ` []` if there is no matching entity.
206+
207+ Format: ` .first(options)` where ` options` is a optional object containing ` { orderBy, where }`
208+
209+ Return: Entity
210+
211+ ` ` ` javascript
212+ const repo = new ItemRepository(injection)
213+ const ret = await repo.first({ orderBy: 'description'})
214+ ` ` `
215+
204216### ` insert`
205217
206218Insert an Entity into a table.
0 commit comments