Package com.orientechnologies.orient.core.record.impl

Examples of com.orientechnologies.orient.core.record.impl.ODocument.reload()


    database.command(
        new OCommandSQL("UPDATE FormatEscapingTest SET test = format('aaa \\' bbb') WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();

    Assert.assertEquals(document.field("test"), "aaa ' bbb");

    database.command(
        new OCommandSQL("UPDATE FormatEscapingTest SET test = 'ccc \\' eee', test2 = format('aaa \\' bbb') WHERE @rid = "
View Full Code Here


    database.command(
        new OCommandSQL("UPDATE FormatEscapingTest SET test = 'ccc \\' eee', test2 = format('aaa \\' bbb') WHERE @rid = "
            + document.getIdentity())).execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "ccc ' eee");
    Assert.assertEquals(document.field("test2"), "aaa ' bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\n bbb' WHERE @rid = " + document.getIdentity()))
        .execute();
View Full Code Here

    Assert.assertEquals(document.field("test2"), "aaa ' bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\n bbb' WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "aaa \n bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\r bbb' WHERE @rid = " + document.getIdentity()))
        .execute();
View Full Code Here

    Assert.assertEquals(document.field("test"), "aaa \n bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\r bbb' WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "aaa \r bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\b bbb' WHERE @rid = " + document.getIdentity()))
        .execute();
View Full Code Here

    Assert.assertEquals(document.field("test"), "aaa \r bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\b bbb' WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "aaa \b bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\t bbb' WHERE @rid = " + document.getIdentity()))
        .execute();
View Full Code Here

    Assert.assertEquals(document.field("test"), "aaa \b bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\t bbb' WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "aaa \t bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\f bbb' WHERE @rid = " + document.getIdentity()))
        .execute();
View Full Code Here

    Assert.assertEquals(document.field("test"), "aaa \t bbb");

    database.command(new OCommandSQL("UPDATE FormatEscapingTest SET test = 'aaa \\f bbb' WHERE @rid = " + document.getIdentity()))
        .execute();

    document.reload();
    Assert.assertEquals(document.field("test"), "aaa \f bbb");
  }

  private void checkUpdatedDoc(ODatabaseDocument database, String expectedName, String expectedCity, String expectedGender) {
    List<ODocument> result = database.query(new OSQLSynchQuery<Object>("select * from person"));
View Full Code Here

        else
          OLogManager.instance().warn(OObjectSerializerHelper.class,
              "@Id field has been declared as %s while the supported are: ORID, Number, String, Object", id.getClass());
      }
      if (iRecord.getIdentity().isValid() && iRecord.getIdentity().isPersistent())
        iRecord.reload();
    }

    // CHECK FOR VERSION BINDING
    final Field vField = getVersionField(pojoClass);
    boolean versionConfigured = false;
View Full Code Here

    ODocument doc = new ODocument();
    doc.field("test", s);
    doc.save();

    doc.reload(null, true);
    Assert.assertEquals(doc.field("test"), s);
  }

  @Test
  public void polymorphicQuery() {
View Full Code Here

    recordVersion.setCounter(-2);
    doc.getRecordVersion().copyFrom(recordVersion);

    doc.save();

    doc.reload();
    Assert.assertEquals(doc.getVersion(), oldVersion);
    Assert.assertEquals(doc.field("name"), "modified");
  }

  public void testCreateEmbddedClassDocument() {
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.