Added support for selecting row with many-to-many relationship