findAround()
MyModel.findAround(
/* {string}. -- The property to look around */
<property>,
/* {string} -- The property value */
<value>,
/* {object} -- { before|after: Number [, ... ] } */
<options>
)// Find the next 20 post after march 1st
BlogPost.findAround('publishedOn', '2016-03-01', { after: 20 })
.then((entities) => {
...
});
// Find 10 users with the lastname coming before 'Jagger'
User.findAround('lastname', 'Jagger', { before: 10 })
.then( ... );Last updated
Was this helpful?