The db relationship is to use the Lister and Seller ID in the Sale table, but display the initials in the gridview like this:
lister.initials,
seller.initials
I believe my relationships are not set up correctly as the above is showing "(not set)" in the gridview (obviously i have triple checked the database data is correct).
It’s because your Sale model already has ‘lister’ and ‘seller’ attributes that are from the column names of ‘sale’ table.
It is also the reason why your ‘getLister()’ relation didn’t work as expected. An attribute based on a column name takes precedence over the relation with the same name.
You may want to rename your columns from ‘lister’ and ‘seller’ to ‘lister_id’ and ‘seller_id’.