Skip to content

Commit fd9a756

Browse files
WINDUPRULE-966 Removed 'hibernate' dependency conditions (#901) (#902)
(cherry picked from commit 6ceeb54) Co-authored-by: Marco Rizzi <mrizzi@users.noreply.github.com>
1 parent f52e0b9 commit fd9a756

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

rules/rules-reviewed/eap8/eap7/hibernate6.windup.xml

+7-14
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,17 @@
1818
<rules>
1919
<rule id="hibernate-00005">
2020
<when>
21-
<and>
22-
<javaclass references="javax.persistence.GeneratedValue">
23-
<location>ANNOTATION</location>
24-
</javaclass>
25-
<or>
26-
<dependency groupId="org.hibernate" artifactId="hibernate-core" toVersion="5.6.15.Final"/>
27-
<project>
28-
<artifact groupId="org.hibernate" artifactId="hibernate-core" toVersion="5.6.15.Final"/>
29-
</project>
30-
</or>
31-
</and>
21+
<javaclass references="javax.persistence.GeneratedValue">
22+
<location>ANNOTATION</location>
23+
</javaclass>
3224
</when>
3325
<perform>
3426
<hint title="Implicit name determination for sequences and tables associated with identifier generation has changed" effort="3" category-id="potential">
3527
<message>
36-
The way in which Hibernate determines implicit names for sequences and tables associated with identifier generation has changed in 6.0 which may affect migrating applications.
37-
As of 6.0, Hibernate by default creates a sequence per entity hierarchy instead of a single sequence hibernate_sequence.
38-
Due to this change, users that previously used `@GeneratedValue(strategy = GenerationStrategy.AUTO)` or simply `@GeneratedValue` (since `AUTO` is the default), need to ensure that the database now contains sequences for every entity, named `&lt;entity name&gt;_seq`. For an entity Person, a sequence person_seq is expected to exist. It’s best to run hbm2ddl (e.g. by temporarily setting `hbm2ddl.auto=create`) to obtain a list of DDL statements for the sequences.
28+
The way in which Hibernate determines implicit names for sequences and tables associated with identifier generation has changed in 6.0 which may affect migrating applications.
29+
As of 6.0, Hibernate by default creates a sequence per entity hierarchy instead of a single sequence hibernate_sequence.
30+
Due to this change, users that previously used `@GeneratedValue(strategy = GenerationStrategy.AUTO)` or simply `@GeneratedValue` (since `AUTO` is the default), need to ensure that the database now contains sequences for every entity, named `&lt;entity name&gt;_seq`. For an entity Person, a sequence person_seq is expected to exist.
31+
It’s best to run hbm2ddl (e.g. by temporarily setting `hbm2ddl.auto=create`) to obtain a list of DDL statements for the sequences.
3932
</message>
4033
<link href="https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#implicit-identifier-sequence-and-table-name" title="Hibernate ORM 6 migration guide - Implicit Identifier Sequence and Table Name"/>
4134
</hint>

0 commit comments

Comments
 (0)