improve code snippets in @Formula annotation jdoc
This commit is contained in:
parent
31574081b8
commit
88fea9a2cf
|
@ -23,15 +23,15 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|||
* A formula may involve multiple columns and SQL operators:
|
||||
* <pre>
|
||||
* // perform calculations using SQL operators
|
||||
* @Formula("sub_total + (sub_total * tax)")
|
||||
* long getTotalCost() { ... }
|
||||
* @Formula("sub_total * (1.0 + tax)")
|
||||
* BigDecimal totalWithTax;
|
||||
* </pre>
|
||||
* <p>
|
||||
* It may even call SQL functions:
|
||||
* <pre>
|
||||
* // call native SQL functions
|
||||
* @Formula("upper(substring(middle_name from 0 for 1))")
|
||||
* Character getMiddleInitial() { ... }
|
||||
* Character middleInitial;
|
||||
* </pre>
|
||||
* <p>
|
||||
* For an entity with {@linkplain jakarta.persistence.SecondaryTable secondary tables},
|
||||
|
|
Loading…
Reference in New Issue