Package br.com.objectos.comuns.relational.search

Examples of br.com.objectos.comuns.relational.search.Join.where()


  public void restrict_on_related_entity() {
    Sql sql = sqlProvider.get();
    sql.select("*").from("COMUNS_RELATIONAL.OTHER").as("O").andLoadWith(loader);

    Join _simple = sql.join("SIMPLE", "S").on("O.SIMPLE_ID = S.ID");
    _simple.where("STRING").equalTo("BCD");

    List<Other> result = sql.list();
    List<String> strings = transform(result, Functions.toStringFunction());
    assertThat(strings.size(), equalTo(1));
    assertThat(strings.get(0), equalTo("Other{id=2, value=BCDCB}"));
View Full Code Here


        .from("COMUNS_RELATIONAL.DEL") //
        .as("DEL");

    Join _simple = op.join("COMUNS_RELATIONAL.SIMPLE", "SIMPLE") //
        .on("DEL.SIMPLE_ID = SIMPLE.ID");
    _simple.where("ID").equalTo(2);

    int rows = op.execute();
    assertThat(rows, equalTo(3));

    List<Del> after = findDel.all();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.