Skip to content

Instantly share code, notes, and snippets.

View beppu's full-sized avatar

John Beppu beppu

View GitHub Profile
new Region()
.publishedDocuments()
.query(function(q){
q.join('regions', 'regions.id', '=', 'documentRegions.region_id');
q.whereIn('regions.id', regionIds);
q.where('publishedDocuments.updated_at', '>=', new Date(timestamp));
})
.fetchAll({withRelated: [
'publishedDocuments.images',
'publishedDocuments.ecareSections',