Exemplo n.º 1
0
  {
    try {
      schema = TempSQLiteRepo.forSchema(RealmSchema.get());
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    Transaction tx;
    Person p;

    tx = schema.connect("testing");
    p = tx.create("Person");
    p.setName("personA");
    p.setSessions(tx.create("Person.sessions"));
    // p.setSessions(new IListing<Session>(Session.class));

    Device dev = tx.create("Device");
    dev.setOwner(p);

    tx.post();
  }