Skip to content

Commit d61f4b3

Browse files
committed
document loss of precision on JSON numbers
1 parent 02a2b16 commit d61f4b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/marklogic/client/pojo/PojoRepository.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@
7575
* serialized and deserialized, but cannot be written, read, or searched directly. If you
7676
* wish to directly write, read, or search another class, create a new instance of
7777
* PojoRepository specific to that class.
78+
*
79+
* Since PojoRepository stores in JSON format, which limits number precision to 15
80+
* significant digits (IEEE754 double precision), you will lose precision on numbers
81+
* longer than 15 significant digits. If you desire larger numbers with no loss of
82+
* precision, use Strings to persist those numbers.
7883
*/
7984
public interface PojoRepository<T, ID extends Serializable> {
8085
/** Write this instance to the database. Uses the field marked with {@literal @}Id

0 commit comments

Comments
 (0)