Skip to content

Commit

Permalink
Updated Hibernate Documentation (#630)
Browse files Browse the repository at this point in the history
* Updated Hibernate Documentation

Added a code snippet which shows how to get the session factory from an EntityManager instead of an EntityManagerFactory.

* Update README.md

Added the missing semicolon.
  • Loading branch information
ablx committed Mar 2, 2021
1 parent 97ad1c1 commit 7a6b9f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,12 @@ or `EntityManagerFactory`, you can use this code to access the underlying `Sessi
```java
SessionFactory sessionFactory = entityManagerFactory.unwrap(SessionFactory.class);
```

respectively

```java
SessionFactory sessionFactory = entityManager.unwrap(Session.class).getSessionFactory();
```
### Jetty

There is a collector for recording various Jetty server metrics. You can do it by registering the collector like this:
Expand Down

0 comments on commit 7a6b9f1

Please sign in to comment.