{
Transaction tx = pm.currentTransaction();
int i, n;
float value;
tx.begin();
FieldsOfPrimitivefloat pi = new FieldsOfPrimitivefloat();
pi.identifier = 1;
pm.makePersistent(pi);
Object oid = pm.getObjectId(pi);
n = pi.getLength();
// Provide initial set of values
for( i = 0, value = (float)10.15; i < n; ++i){
pi.set( i, value);
}
tx.commit();
// cache will be flushed
pi = null;
System.gc();
tx.begin();
pi = (FieldsOfPrimitivefloat) pm.getObjectById(oid, true);
checkValues(oid, (float)10.15);
// Provide new set of values
for( i = 0, value = (float)33000.15; i < n; ++i){
pi.set(i, value);
}
tx.commit();
// cache will be flushed
pi = null;
System.gc();