dataPointDAO.find(primaryKey);
assertNotNull(dataPoint2);
assertEquals(dataPoint, dataPoint2);
DataPointIndicator dataPointIndicator =
dataPoint.getDataPointIndicator();
assertNotNull(dataPointIndicator);
assertNotNull(dataPointIndicator.getId());
/* @see DataPointIndicatorDAOTest Where this problem doesn't exist.
* @todo Figure out if this is correct:
*
* Calling .persist() will not automatically set the id value. Your JPA
* provider will ensure that it is set before the entity is finally
* written to db. So you are right to assume that the id will be
* assigned when the transaction is committed. But this is not the only
* possible case. When you call .flush() the very same will happen.
*/
// assertNotNull(dataPointIndicator.getPrimaryKey());
assertNotNull(dataPointIndicator.getValue());
dataPoint2.setValue(DataPointCountryDAOTest.VALUEY);
dataPointDAO.merge(dataPoint2);