Define the entity with the proper JDO annotations.
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyEntity {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private BigDecimal amount;
}
The JDO implementation for the app engine datastore will handle the persistence of the BigDecimal value even though BigDecimal itself is not persisted.
The important thing to understand is that there is a conversion happening so the BigDecimal precision is not entirely maintained. It seems to be the same as if you converted a BigDecimal object into float or double and back to BigDecimal. So, a BigDecimal with the value 1.99 might be actually stored as something like 1.9900000000000001101341... when it is converted back to BigDecimal.