Package com.avaje.tests.model.basic

Examples of com.avaje.tests.model.basic.TUuidEntity


public class TestUuidInsert extends BaseTestCase {

  @Test
  public void test() {
   
    TUuidEntity e = new TUuidEntity();
    e.setName("bana");
   
    Ebean.save(e);
   
    TUuidEntity e2 = Ebean.find(TUuidEntity.class, e.getId());
    e2.setName("apple");
   
    Ebean.save(e2);
   
    Ebean.delete(e2);
  }
View Full Code Here


public class TestSqlRowUUID extends BaseTestCase {

  @Test
  public void test() {

    TUuidEntity e = new TUuidEntity();
    e.setName("blah");

    Ebean.save(e);

    SqlQuery q = Ebean.createSqlQuery("select * from tuuid_entity where id = :id");
    q.setParameter("id", e.getId());
    SqlRow sqlRow = q.findUnique();

    UUID id = sqlRow.getUUID("id");

    Assert.assertNotNull(id);
View Full Code Here

TOP

Related Classes of com.avaje.tests.model.basic.TUuidEntity

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.