quick
quick copied to clipboard
BUG - Quick can't find initialThroughConstraints
I'm not sure what to do with this, but I am trying to define a relationship for a user that pulls up a single account out of many to which he could be attached. After going through it I think I need a scope instead, but this is the relationship code I used at the time. https://www.screencast.com/t/L37c6TjVi
function UserAccounts() {
return hasMany('UserAccount');
}
function CurrentUserAccount() {
return hasOne('UserAccount', 'userID', 'lastAccountID');
}
function CurrentAccount() {
return hasOneThrough(['CurrentUserAccount', 'Account']);
}