Skip to content

Instantly share code, notes, and snippets.

@thjanssen
Last active April 18, 2017 12:00
Show Gist options
  • Save thjanssen/75d9c920ce3c6c67b136043ca0860101 to your computer and use it in GitHub Desktop.
Save thjanssen/75d9c920ce3c6c67b136043ca0860101 to your computer and use it in GitHub Desktop.
@Id
@GeneratedValue
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "book_generator")
@SequenceGenerator(name="book_generator", sequenceName = "book_seq", allocationSize=50)
@Column(name = "id", updatable = false, nullable = false)
private Long id;
@Id
@GeneratedValue(strategy = GenerationType.TABLE, generator = "book_generator")
@TableGenerator(name="book_generator", table="id_generator", schema="bookstore")
@Column(name = "id", updatable = false, nullable = false)
private Long id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment