The javadoc says
A unique generator name that can be
referenced by one or more classes to
be the generator for primary key
values
But its annotation that is put on top of @Entity, so I don’t understand the reasoning.
Can I use in @Entity @SequenceGenerator defined in other @Entity?
The idea is that multiple entities might want to share a key space.
For example if you have two entities
FooandBaryou’d want to avoid having both aFoowith id 1 and aBarwith id 1. You’d do that by specifying the samenamefor their@SequenceGeneratorannotations.