An easier workaround is to use:
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "myGenerator")