7

If I have only GeneratedValue in super class and if I have a specific generator type in subclass, how can i override this feature.

SUPER CLASS :

@Id
@GeneratedValue
private Long id;

SUB CLASS:

@Id
@SequenceGenerator(name = "a", sequenceName = "a")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "a")
private Long id;
dinesh707
  • 12,106
  • 22
  • 84
  • 134
  • Check if this post can help you, http://stackoverflow.com/questions/8589928/mappedsuperclass-change-sequencegenerator-in-subclass – Lucas Oliveira Nov 19 '13 at 14:42
  • Super class is untouchable. What i like to do is override the @GeneratedValue for anything that i like. Not only sequence. – dinesh707 Nov 19 '13 at 14:51

0 Answers0