You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Insert, Find, Update and Remove operations are pure-JPA and are straightforward.
Person person = new Person();
person.setPersonId("1");
person.setPersonName("John Smith");
person.setAge(32);
EntityManagerFactory emf = Persistence.createEntityManagerFactory("oracle_nosql_pu");
EntityManager em = emf.createEntityManager();
//Insert data
em.persist(person);
em.clear(); //Clear cache before finding record
//Search for data
Person peronFound = em.find(Person.class, "1");
//Update data
person.setAge(33);
em.merge(person);
//Delete data
em.remove(person);
em.close();
emf.close();