Package com.google.appengine.datanucleus.bugs.jpa

Source Code of com.google.appengine.datanucleus.bugs.jpa.Issue198Test

package com.google.appengine.datanucleus.bugs.jpa;

import com.google.appengine.api.datastore.EntityNotFoundException;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.datanucleus.bugs.test.Foo;

public class Issue198Test extends JPABugTestCase {
  public void testRun() {
    beginTxn();
    Foo pojo = new Foo();
    em.persist(pojo);
    commitTxn();
    try {
      com.google.appengine.api.datastore.Entity e =
        ds.get(KeyFactory.createKey("BugsJPA$Foo", pojo.getId()));
      assertTrue(e.hasProperty("barKey"));
    } catch (EntityNotFoundException enfe) {
      fail("Entity wasn't found");
    }
  }
}
TOP

Related Classes of com.google.appengine.datanucleus.bugs.jpa.Issue198Test

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.