document a (possibly temporary) restriction

This commit is contained in:
Gavin King 2023-08-18 15:36:20 +02:00
parent 49495c2a54
commit 8461ba2078
1 changed files with 3 additions and 1 deletions

View File

@ -1029,12 +1029,14 @@ It's even possible to specify an ordering for an indexed column, or that the ind
[source,java]
----
@Entity
@Table(indexes=@Index(columnList="lower(title), year desc, publisher_id"))
@Table(indexes=@Index(columnList="(lower(title)), year desc, publisher_id"))
class Book { ... }
----
This lets us create a customized index for a particular query.
Note that SQL expressions like `lower(title)` must be enclosed in parentheses in the `columnList` of the index definition.
[TIP]
====
It's not clear that information about indexes belongs in annotations of Java code.