Top "Persist" questions

JPA EntityManager: Why use persist() over merge()?

EntityManager.merge() can insert new objects and update existing ones. Why would one want to use persist() (which can only …

jpa merge entitymanager persist java-persistence-api
PersistentObjectException: detached entity passed to persist thrown by JPA and Hibernate

I have a JPA-persisted object model that contains a many-to-one relationship: an Account has many Transactions. A Transaction has one …

java hibernate jpa entity persist
JPA merge vs. persist

So far, my preference has been to always use EntityManager's merge() take care of both insert and update. But I …

java jpa merge entitymanager persist
EntityManager persist() method does not insert record to database

I have problem with using EntityManager.persist(Object) method. Now when i get rid of other problems, by app work …

spring hibernate jpa persist
How to persist an Array List of type Entity in JPA

How to persist an Array List of type Entity in JPA ? For example, there is an entity called "Table". I …

jpa arraylist entity persist
Spring-Data JPA: save new entity referencing existing one

The question is basically the same as below one: JPA cascade persist and references to detached entities throws PersistentObjectException. Why? …

java merge spring-data spring-data-jpa persist
Finding image type from NSData or UIImage

I am loading an image from a URL provided by a third-party. There is no file extension (or filename for …

iphone ios uiimage nsdata persist
Any way to pre populate core data?

I've been creating a list app and backing it with core data. I would like to have a default list …

ios iphone uitableview core-data persist
AngularJS: Change hash and route without completely reloading controller

I have a controller, with a route like this: #/articles/1234 I want to change the route without completely reloading the …

controller reload routes angularjs persist
How to persist Collections/List inside an object using JPA

I'm trying to persist a List inside an object Team. I cannot get JPA to persist it for me. After …

jpa collections persist