You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export default class Transfer extends Model {
static entity = 'transfers'
static fields () {
return {
id: this.attr(null),
files: this.hasMany(File, 'transfer_id'),
links: this.hasMany(Link, 'transfer_id'),
}
}
Currently we receive the entities all separated. But it would be nice if the requested model would also had the objects included (like if you would execute query().withAll())
return Transfer.api().get(`/transfers/${transferId}`)
.then((response) => {
console.log(response.entities.transfers)
console.log(response.entities.files)
console.log(response.entities.links)
// Have to query to this way to get files
let transfer = Transfer.query()
.withAll()
.where({
id: response.entities.transfers[0]
})
.first();
commit('doSomething', transfer)
})
The text was updated successfully, but these errors were encountered:
Let's take this model as example:
Currently we receive the entities all separated. But it would be nice if the requested model would also had the objects included (like if you would execute query().withAll())
The text was updated successfully, but these errors were encountered: