Guest User

Untitled

a guest
Nov 17th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @Entity
  2. @SequenceGenerator(name="[notification.id_seq]_generator", sequenceName="[notification.id_seq]", allocationSize=1)
  3. public class Notification {
  4.  
  5. ...
  6. @Id
  7. @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="[notification.id_seq]_generator")
  8. @Column(name="id")
  9. public Long getId () {
  10. return _id;
  11. }
  12. ..
  13. }
  14.  
  15. Hibernate:
  16. select
  17. next value for `notification.id_seq`
  18.  
  19. Hibernate:
  20. select
  21. next value for [notification.id_seq]
Add Comment
Please, Sign In to add comment