[hibernate-dev] [ORM] Documentation inconsistencies

Marko B marko.prykladna at gmail.com
Tue Aug 29 13:12:22 EDT 2017


Hi all!

I've noticed some inconsistency between the Hibernate ORM User Guide [1]
and what seems to be in the documentation files in the GitHub repo. In
particular examples of @GeneratedValue usages:

Example 131. Unnamed sequence
@Entity
public class MyEntity {

    @Id
    @GeneratedValue( generation = SEQUENCE )
    public Integer id;

    ...
}

and in documentation files on GitHub [2] which seems to be using java code
from test sources [3], it's:

@Id
@GeneratedValue(
strategy = GenerationType.SEQUENCE
)
private Long id;

I've noticed it, as User Guide example is using this `generation` attribute
which should probably be `strategy` instead.

Have a nice day,
Marko

[1]
http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html
[2]
https://github.com/hibernate/hibernate-orm/blob/master/documentation/src/main/asciidoc/userguide/chapters/domain/identifiers.adoc
[3]
https://github.com/hibernate/hibernate-orm/blob/master/documentation/src/test/java/org/hibernate/userguide/mapping/identifier/SequenceGeneratorUnnamedTest.java#L55-L57


More information about the hibernate-dev mailing list