alesj wrote:
# A number of annotations have been tweaked in the spec here and there. refer to the EJB3 spec for more details.
* For instance: @Id(generator=GeneratorType) is now two annotations @Id and @GeneratedValue
I read the spec but I don't found how to do this.
I have an @Id annotation.
I have a @GeneratedValue(generator="name") annotation that declares that I apply the generator named "name" to get the value for my ID.
I need also an annotation for my generator which describes how I get the value for generator "name". It cound be @SequenceGenerator, @TableGenerator or Hibernate-specific @GenericGenerator. My question - how I can make my own generator, another that one of these 3 generators? With @GenericGenerator it is very easy - I say @GenericGenerator(name="name", strategy="mypackage.Myclass") and write the mypackage.Myclass class that implements the interface IdentifierGenerator.
Thanx.