Skip to content

Instantly share code, notes, and snippets.

@thjanssen
Last active July 22, 2016 07:31
Show Gist options
  • Save thjanssen/7da5d897835a326a91a25348bb4791a4 to your computer and use it in GitHub Desktop.
Save thjanssen/7da5d897835a326a91a25348bb4791a4 to your computer and use it in GitHub Desktop.
@Entity
public class Author {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "author_generator")
@SequenceGenerator(name="author_generator", sequenceName = "author_seq")
@Column(name = "id", updatable = false, nullable = false)
private Long id;
...
}
05:20:28,543 DEBUG [org.hibernate.SQL] - select nextval ('author_seq')
05:20:28,570 DEBUG [org.hibernate.SQL] - insert into Author (firstName, lastName, version, id) values (?, ?, ?, ?)
05:20:28,574 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [1] as [VARCHAR] - [firstName]
05:20:28,574 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [2] as [VARCHAR] - [lastName]
05:20:28,575 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [3] as [INTEGER] - [0]
05:20:28,576 TRACE [org.hibernate.type.descriptor.sql.BasicBinder] - binding parameter [4] as [BIGINT] - [1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment