criteria: fix issue #2157 (multiple joins)
criteria: added tests for left and right joins