ViewModel.mapToModel would break down when the view model was composed of multiple aliased joins on the same table. This PR adds a new version of the mapToModel method that takes an aliased table argument to correct this problem. The single-arg version will still work as expected if the view model joins on a table only once, but will throw an exception to indicate programmer error if it detects multiple aliases for the same class are present.
ViewModel.mapToModel would break down when the view model was composed of multiple aliased joins on the same table. This PR adds a new version of the mapToModel method that takes an aliased table argument to correct this problem. The single-arg version will still work as expected if the view model joins on a table only once, but will throw an exception to indicate programmer error if it detects multiple aliases for the same class are present.