Top "Persistence" questions

Persistence in computer programming refers to the capability of saving data outside the application memory.

org.hibernate.AnnotationException: @OneToOne or @ManyToOne on entities.Ques#tion.examId references an unknown entity: long

I'm trying to setup JPA with a hibernate implementation for the first time with this test project. Ran into the …

java hibernate jpa persistence
JPA Map<String,String> mapping

How can I map a Map in JPA without using Hibernate's classes?

java hibernate mapping persistence
What do REFRESH and MERGE mean in terms of databases?

I'm curious and need to find this answer quick. Google won't help much. The Java Persistence API has these properties …

java jpa persistence
One-To-Many Relationship with Join Table

I have a one-to-many relationship modeled using join table: create table t1 (id int primary key, name varchar(10) /*...*/); create table …

java jpa persistence
When to use DiscriminatorValue annotation in hibernate

What and when is the best scenario to use DiscriminatorValue annotation in hibernate?

java hibernate jpa persistence
Using HSQL in-memory database as JPA datasource

I have an in-memory data source: java.sql.Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:testdb", "sa", ""); emf = Persistence.createEntityManagerFactory("…

hibernate jpa persistence jpa-2.0 hsqldb
Persistence unit as RESOURCE_LOCAL or JTA?

I have queries as below: What is the difference of these two? Are both of these supported by all databases? …

java spring jpa persistence jta
javax.persistence.Entitymanager: remove() method

Does remove(Object entity) method of EntityManager work only on those objects got from find() method? I have following code …

java jpa persistence
Solve Hibernate Lazy-Init issue with hibernate.enable_lazy_load_no_trans

I have been suffering from infamous hibernate exception org.hibernate.LazyInitializationException: could not initialize proxy - no Session Now the …

java hibernate jpa persistence lazy-initialization
Writing Maven Dependency for javax.persistence

Can someone help me write the dependency for javax.persistence. I have googled it but nothing worked. I bumped into …

java eclipse spring-mvc maven persistence