---
title: "Get Nextval From Sequence With Spring JPA"
url: https://daily.dev/posts/get-nextval-from-sequence-with-spring-jpa-xoihak1rq
source_url: https://feeds.feedblitz.com/~/890510618/0/baeldung~Get-Nextval-From-Sequence-With-Spring-JPA
type: article
source: "Baeldung"
published: 2024-05-02T04:34:30.583Z
updated: 2024-05-09T08:22:04.995Z
tags: ["database", "spring", "postgresql", "maven"]
reading_time: 4
upvotes: 2
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Nextval From Sequence With Spring JPA

**[Baeldung](https://daily.dev/sources/baeldung)** · 4 min read · 2 upvotes · 0 comments

## Summary

This post explores different approaches to fetching the next value from a database sequence using Spring Data JPA. It covers using '@SequenceGenerator' and '@GeneratedValue' annotations, custom queries, and the 'EntityManager' API.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://feeds.feedblitz.com/~/890510618/0/baeldung~Get-Nextval-From-Sequence-With-Spring-JPA>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#spring](https://daily.dev/tags/spring), [#postgresql](https://daily.dev/tags/postgresql), [#maven](https://daily.dev/tags/maven)

[View this post on daily.dev](https://daily.dev/posts/get-nextval-from-sequence-with-spring-jpa-xoihak1rq)
