title: Eclipse link JPA Select Query returns null field value
body: <p>We are fetching data from a small table 'ACCESS_STATUS' as depicted below.</p>
  
  <blockquote>
    <p>ID  NAME
    1   External
    2   Internal</p>
  </blockquote>
  
  <p>When we use below JPA code: In a particular scenario, when two users simultaneously access this table, the Name column of the first row is fetched as NULL. This field is used further so a null pointer exception is thrown and the application stops working and it has to be restarted.</p>
  
  <pre><code>JpaEntityManager jpaEm = JpaHelper.getEntityManager(em);
  ReadAllQuery query=new ReadAllQuery(AccessStatus.class);
   Collection accessStatus =  (Collection)jpaEm.getActiveSession().executeQuery(query)
  </code></pre>
  
  <p>If I use a native query like below, this problem is not there:</p>
  
  <pre><code>try {
  preparedStatement=connection.prepareStatement(sb.toString());
  resultSet=preparedStatement.executeQuery();
  
  while (resultSet.next()) {
   id = resultSet.getString(1);
  name = resultSet.getString(2);
  accessStatus.add(new AccessStatus(id,name));
  
          }
      }
  </code></pre>
  
  <p>Is this a bug in JPA/Java EE? What is a permanent fix for this issue?</p>