yahoo / squidb

SquiDB is a SQLite database library for Android and iOS
https://github.com/yahoo/squidb/wiki
Apache License 2.0
1.31k stars 132 forks source link

mapToModel fixes #150

Closed sbosley closed 8 years ago

sbosley commented 8 years ago

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.

sbosley commented 8 years ago

I'd like to also address #152 with this PR, so let's hold off on merging it until I can get a handle on that as well.

sbosley commented 8 years ago

I've added the changes that fix #152, so this is now ready for a good thorough review.

jdkoren commented 8 years ago

LGTM