| When generating entities with EJB3 annotations with a strategy set to "sequence", Hibernate tools generates POJOs with non unique javax.persistence.SequenceGenerator name "generator". But according to the Java documentation : String name (Required) A unique generator name that can be referenced by one or more classes to be the generator for primary key values. See javadoc Exemple of generated code with 4.0.0 Alpha1: @SequenceGenerator(name = "generator", sequenceName = "S_CLIENT") @Id @GeneratedValue(strategy = SEQUENCE, generator = "generator") @Column(name = "CLIENT_ID", unique = true, nullable = false, precision = 22, scale = 0) public long getClientId() { return this.clientId; } Source code can be seen here. So looks like the //TODO comment is right and it should generate a unique name atribute. sequencename+"generator" would be a good name. It would even be better if we could define this name in reveng.xml or/and in a DelegatingReverseEngineeringStrategy class. |