delete « Eclipse « JPA Q&A





1. JPA: How do I synchronize the persistence context with the result of the bulk update or delete?    stackoverflow.com

There's a statement in the ejb-3_0-fr-spec-persistence.pdf which reads The persistence context is not synchronized with the result of the bulk update or delete So if I do a query.executeUpdate which deletes rows from ...

2. hibernate - delete hql in eclipse hibernate tool    stackoverflow.com

I tried to execute a delete query as following in eclipse's HQL tool

delete from Address address where address.id = 6
but i got the
org.hibernate.hql.QueryExecutionRequestException: Not supported for DML operations
Please tell me that ...

3. How do I delete all JPA entities?    stackoverflow.com

In my testing code I need to have a blank/empty database at each method. Is there code that would achieve that, to call in the @Before of the test?

4. JPA update many-to-many deleting records    stackoverflow.com

I have a @ManyToMany relationship between two entities. When I perform an update on the owning side, it appears that JPA deletes all the linked records from my database and re-inserts ...

5. Why does not jpa2/eclipselink generate on delete cascade SQL?    stackoverflow.com

@Entity public class MUser implements Serializable, MemoEntity {

private static final long serialVersionUID = 1L;
@Id
private String email;

@OneToMany(cascade=CascadeType.ALL, orphanRemoval=true)
private Set<Meaning> mengs = new HashSet<Meaning>();
Shouldn't this mean that I get the constraint with a "on ...

6. Should I let JPA or the database cascade deletions?    stackoverflow.com

Let's say we have two entities, A and B. B has a many-to-one relationship to A like follows:

@Entity
public class A {
  @OneToMany(mappedBy="a_id")
  private List<B> children;
}

@Entity
public class B {
  ...

7. EclipseLink deleting referenced entity    stackoverflow.com

I'm using EclipseLink as my persistance unit. I'm having a problem on deleting an entity. Following example: a device has a type. There are many devices which could have the same ...

8. bulk delete in eclipse HQL editor    forum.hibernate.org