Last active
July 26, 2019 16:13
-
-
Save thjanssen/50a0a42199c0301a4ec3b66c1bb3d985 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HashMap<String, Object> hints = new HashMap<>(); | |
hints.put("javax.persistence.query.timeout", 1000); | |
em.find(Author.class, 1L, hints); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Author> authors = em.createQuery("SELECT a FROM Author a") | |
.setHint("javax.persistence.query.timeout", 1000) | |
.getResultList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment