Given the following 2 models:
export default DS.Model.extend({
slug: DS.attr('string'),
name: DS.attr('string'),
username: DS.attr('string'),
auth: DS.belongsTo('auth', { async: true, inverse: 'user' }),
avatarImage: DS.belongsTo('image', { async: true }),
listingEvents: DS.hasMany('listingEvent', { async:true, inverse: 'users' }),
email: DS.attr('string')
});
and
export default DS.Model.extend({
currentUserAttending: DS.attr(),
name:DS.attr(),
slug: DS.attr('string'),
start:DS.attr('string'),
end:DS.attr('string'),
eventInstanceSlug: DS.attr('string'),
location: DS.belongsTo('location', { async:true }),
artists: DS.hasMany('artist', { async:true }),
users: DS.hasMany('user', { async:true })
});
How can I fetch all listingEvents where users contains a user with id xxxxx
Is this possible?