mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#530 - Bad join with raw() expression on a @ManyToMany path.
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user