From d93f6482300f2124067b8bd9b2a31abe1e925474 Mon Sep 17 00:00:00 2001 From: Christian Stoller Date: Thu, 25 Sep 2014 09:38:34 +0200 Subject: [PATCH] Extended the docs for mapping attributes precision and scale --- docs/en/reference/annotations-reference.rst | 9 ++++++--- docs/en/reference/basic-mapping.rst | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/en/reference/annotations-reference.rst b/docs/en/reference/annotations-reference.rst index e3000ea10..8d40096ca 100644 --- a/docs/en/reference/annotations-reference.rst +++ b/docs/en/reference/annotations-reference.rst @@ -99,10 +99,13 @@ Optional attributes: string values for you. - **precision**: The precision for a decimal (exact numeric) column - (Applies only for decimal column) + (applies only for decimal column), which is the maximum number of + digits that are stored for the values. -- **scale**: The scale for a decimal (exact numeric) column (Applies - only for decimal column) +- **scale**: The scale for a decimal (exact numeric) column (applies + only for decimal column), which represents the number of digits + to the right of the decimal point and must not be greater than + *precision*. - **unique**: Boolean value to determine if the value of the column should be unique across all rows of the underlying entities table. diff --git a/docs/en/reference/basic-mapping.rst b/docs/en/reference/basic-mapping.rst index 2d5c56dca..41d3e30f2 100644 --- a/docs/en/reference/basic-mapping.rst +++ b/docs/en/reference/basic-mapping.rst @@ -199,9 +199,12 @@ list: - ``nullable``: (optional, default FALSE) Whether the database column is nullable. - ``precision``: (optional, default 0) The precision for a decimal - (exact numeric) column. (Applies only if a decimal column is used.) + (exact numeric) column (applies only for decimal column), + which is the maximum number of digits that are stored for the values. - ``scale``: (optional, default 0) The scale for a decimal (exact - numeric) column. (Applies only if a decimal column is used.) + numeric) column (applies only for decimal column), which represents + the number of digits to the right of the decimal point and must + not be greater than *precision*. - ``columnDefinition``: (optional) Allows to define a custom DDL snippet that is used to create the column. Warning: This normally confuses the SchemaTool to always detect the column as changed.