#530 - Bad join with raw() expression on a @ManyToMany path.

This commit is contained in:
Robin Bygrave
2016-01-19 13:18:28 +13:00
parent d33afd85de
commit e7c6223799
2 changed files with 16 additions and 2 deletions
@@ -2,6 +2,7 @@ package com.avaje.tests.basic;
import java.util.List;
import com.avaje.ebean.Query;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
@@ -42,4 +43,16 @@ public class TestM2MCascadeOne extends BaseTestCase {
Ebean.save(u1);
}
@Test
public void testRawPredicate_with_ManyToManyPath() {
Query<MUser> query = Ebean.find(MUser.class)
.select("userid")
.where().raw("roles.roleid in (?)", 24)
.query();
query.findList();
}
}