quick icon indicating copy to clipboard operation
quick copied to clipboard

BUG - Quick can't find initialThroughConstraints

Open Daemach opened this issue 3 years ago • 0 comments

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']);
    }

Daemach avatar Sep 16 '20 16:09 Daemach