Package br.com.objectos.way.relational

Examples of br.com.objectos.way.relational.PrimaryKey


    assertThat(before.get(3).toString(), equalTo("Duo{id=4, a=B, b=A}"));
    assertThat(before.get(4).toString(), equalTo("Duo{id=5, a=B, b=B}"));
    assertThat(before.get(5).toString(), equalTo("Duo{id=6, a=B, b=C}"));

    Duo duo = new Duo("XXX", "ZZZ");
    atomicMerge.update(duo).with(new PrimaryKey(3));

    List<Duo> after = findAll();

    assertThat(after.size(), equalTo(6));
    assertThat(after.get(0).toString(), equalTo("Duo{id=1, a=A, b=A}"));
View Full Code Here


  public void insert_should_be_converted_to_update() {
    Insert insert = Insert.into("MY_TABLE")
        .value("COL1", "A")
        .value("COL2", "B");

    String sql = insert.toUpdate(new PrimaryKey(123));

    assertThat(sql, equalTo("update MY_TABLE set `COL1`=?, `COL2`=? where `ID`=?"));
  }
View Full Code Here

TOP

Related Classes of br.com.objectos.way.relational.PrimaryKey

Copyright © 2018 www.massapicom. 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.