mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 05:04:52 +00:00
fix two more doc issues for Steve
This commit is contained in:
parent
903d71ed2d
commit
1afafe95c4
@ -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
|
||||
|
@ -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();
|
||||
----
|
||||
|
Loading…
x
Reference in New Issue
Block a user