fix two more doc issues for Steve

This commit is contained in:
Gavin 2023-05-18 11:47:13 +02:00 committed by Christian Beikov
parent 903d71ed2d
commit 1afafe95c4
2 changed files with 10 additions and 10 deletions

View File

@ -1406,16 +1406,16 @@ Let's pause to remember the annotations we've met so far.
.Declaring basic attributes
[cols="22,~,^10,^13"]
|===
| Annotation | Purpose | Required | JPA-standard
| Annotation | Purpose | | JPA-standard
| `@Id` | Declare a basic-typed identifier attribute | Yes | ✓
| `@Version` | Declare a version attribute | Yes | ✓
| `@Basic` | Declare a basic attribute | No | ✓
| `@EmbeddedId` | Declare an embeddable-typed identifier attribute | Yes | ✓
| `@Embedded` | Declare an embeddable-typed attribute | No | ✓
| `@Enumerated` | Declare an `enum`-typed attribute and specify how it is encoded | No | ✓
| `@Array` | Declare that an attribute maps to a SQL `ARRAY`, and specify the length | No | ✗
| `@ElementCollection` | Declare that a collection is mapped to a dedicated table | Yes | ✓
| `@Id` | Declare a basic-typed identifier attribute | | ✓
| `@Version` | Declare a version attribute | | ✓
| `@Basic` | Declare a basic attribute | Default | ✓
| `@EmbeddedId` | Declare an embeddable-typed identifier attribute | | ✓
| `@Embedded` | Declare an embeddable-typed attribute | Inferred | ✓
| `@Enumerated` | Declare an `enum`-typed attribute and specify how it is encoded | Inferred | ✓
| `@Array` | Declare that an attribute maps to a SQL `ARRAY`, and specify the length | Inferred | ✗
| `@ElementCollection` | Declare that a collection is mapped to a dedicated table | | ✓
|===
.Converters and compositional basic types

View File

@ -430,7 +430,7 @@ Or, if we're sticking to the JPA-standard APIs:
[source,java]
----
List<Book> matchingBooks =
session.createQuery("from Book where title like :titleSearchPattern", Book.class)
entityManager.createQuery("select b from Book b where b.title like :titleSearchPattern", Book.class)
.setParameter("titleSearchPattern", titleSearchPattern)
.getResultList();
----