From a3cd3a983908777cdd167fb5001fbcbf21868d37 Mon Sep 17 00:00:00 2001 From: Gavin Date: Sun, 14 May 2023 12:37:24 +0200 Subject: [PATCH] improve code snippets in @Formula annotation jdoc --- .../src/main/java/org/hibernate/annotations/Formula.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java b/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java index a2c2b4a3d9..df04bdacaa 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/Formula.java @@ -23,15 +23,15 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; * A formula may involve multiple columns and SQL operators: *
  * // perform calculations using SQL operators
- * @Formula("sub_total + (sub_total * tax)")
- * long getTotalCost() { ... }
+ * @Formula("sub_total * (1.0 + tax)")
+ * BigDecimal totalWithTax;
  * 
*

* It may even call SQL functions: *

  * // call native SQL functions
  * @Formula("upper(substring(middle_name from 0 for 1))")
- * Character getMiddleInitial() { ... }
+ * Character middleInitial;
  * 
*

* For an entity with {@linkplain jakarta.persistence.SecondaryTable secondary tables},