Package com.force.sdk.jpa.entities

Examples of com.force.sdk.jpa.entities.PersonEntity


        Assert.assertNotSame(a1, personEntity, "New object was not created by merge().");
    }
   
    @Test
    public void testMergeInSeparateTx() {
        PersonEntity personEntity = new PersonEntity();
        personEntity.setName("testMergeInSeparateTx");
       
        EntityTransaction tx = em.getTransaction();
        tx.begin();
        em.persist(personEntity);
        tx.commit();
       
        String persistPersonEntityId = personEntity.getId();
        personEntity.setName("testMergeInSeparateTxUpdate");
       
        tx = em.getTransaction();
        tx.begin();
        em.merge(personEntity);
        tx.commit();
       
        Assert.assertEquals(personEntity.getId(), persistPersonEntityId,
                                "Created new entity in separate transaction merge.");
    }
View Full Code Here

TOP

Related Classes of com.force.sdk.jpa.entities.PersonEntity

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.