Update model.class.php

Adding the ability for direct joins to be used