table « EntityManager « JPA Q&A

1. How can I get information out of a junction table using JPA/EclipseLink?

I have the following many-to-many mapping:

public class Student implements
    private Integer xID;

@JoinTable(name = "x_y", 
     joinColumns ...

2. Strange JPA behaviour: tables cleaned at app boot

Almost all is in the title... Persistence is working fine when app launched, and row are still in DB when the app is closed, but once app is loaded, rows got ...

3. EntityManager.merge() does not create table record

The following code fails to create a new record reliably.

TransferRecord transfer = new TransferRecord();
Here's the code for the transfer record:
 * Contains a record of an ongoing transfer.
 * @author anchapma

4. JPA and JPQL: NoResultException when selecting from multiple tables where one value is null

I'm using Java EE 6 and query a database using JPA's javax.persistence.Entitymanager. I have a JPQL query code snippet that looks like something like this:

Query query = entityManager.createQuery("