Skip to content

Commit 725faa2

Browse files
committed
HHH-14509 : Git master -> main branch renaming
1 parent b4bf581 commit 725faa2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+403
-454
lines changed

.github/workflows/contributor-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ name: Hibernate ORM build
99
on:
1010
push:
1111
branches:
12-
- 'master'
12+
- 'main'
1313
- 'wip/6.0'
1414
pull_request:
1515
branches:
16-
- 'master'
16+
- 'main'
1717
- 'wip/6.0'
1818
jobs:
1919
build:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ although this is more of a mnemonic strategy than a hard-and-fast rule - but doi
6262

6363
_If there is not already a JIRA issue covering the work you want to do, create one._
6464

65-
Assuming you will be working from the master branch and working
66-
on the JIRA HHH-123 : `git checkout -b HHH-123 master`
65+
Assuming you will be working from the `main` branch and working
66+
on the JIRA HHH-123 : `git checkout -b HHH-123 main`
6767

6868

6969
## Code

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ It also provides an implementation of the JPA specification, which is the standa
88

99
This is the repository of its source code: see [Hibernate.org](http://hibernate.org/orm/) for additional information.
1010

11-
[![Build Status](http://ci.hibernate.org/job/hibernate-orm-master-h2-main/badge/icon)](http://ci.hibernate.org/job/hibernate-orm-master-h2-main/)
11+
[![Build Status](http://ci.hibernate.org/job/hibernate-orm-main-h2-main/badge/icon)](http://ci.hibernate.org/job/hibernate-orm-main-h2-main/)
1212
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/hibernate/hibernate-orm.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/hibernate/hibernate-orm/context:java)
1313

1414
Building from sources

etc/hibernate.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ hibernate.connection.url jdbc:hsqldb:./build/db/hsqldb/hibernate
190190

191191
#hibernate.dialect org.hibernate.dialect.InterbaseDialect
192192
#hibernate.connection.username sysdba
193-
#hibernate.connection.password masterkey
193+
#hibernate.connection.password thekey
194194

195195
## DO NOT specify hibernate.connection.sqlDialect
196196

etc/hibernate.properties.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ hibernate.connection.url @DB_URL@
169169

170170
#hibernate.dialect org.hibernate.dialect.InterbaseDialect
171171
#hibernate.connection.username sysdba
172-
#hibernate.connection.password masterkey
172+
#hibernate.connection.password thepass
173173

174174
## DO NOT specify hibernate.connection.sqlDialect
175175

hibernate-core/src/main/java/org/hibernate/internal/CoreMessageLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ void cannotResolveNonNullableTransientDependencies(
16691669
)
16701670
void applyingExplicitDiscriminatorColumnForJoined(String className, String overrideSetting);
16711671

1672-
// 458-466 reserved for use by master (ORM 5.0.0)
1672+
// 458-466 reserved for use by main branch (ORM 5.0.0)
16731673

16741674
@LogMessage(level = DEBUG)
16751675
@Message(value = "Creating pooled optimizer (lo) with [incrementSize=%s; returnClass=%s]", id = 467)

hibernate-core/src/test/java/org/hibernate/test/annotations/entity/FormalLastName.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class FormalLastName {
2626
@Embedded
2727
private LastName lastName;
2828

29-
private String designation; /* Mr/Mrs/Master */
29+
private String designation; /* Mr/Mrs */
3030

3131
public Integer getId() {
3232
return id;

hibernate-core/src/test/java/org/hibernate/test/fileimport/Dog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
public class Dog {
1414
private Integer id;
15-
private Human master;
15+
private Human owner;
1616

1717
public Integer getId() {
1818
return id;
@@ -22,11 +22,11 @@ public void setId(Integer id) {
2222
this.id = id;
2323
}
2424

25-
public Human getMaster() {
26-
return master;
25+
public Human getOwner() {
26+
return owner;
2727
}
2828

29-
public void setMaster(Human master) {
30-
this.master = master;
29+
public void setOwner(Human owner) {
30+
this.owner = owner;
3131
}
3232
}

hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedFormWithBeanValidationNotNullTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class AnnotatedFormWithBeanValidationNotNullTest extends BaseUnitTestCase
2121
@TestForIssue( jiraKey = "HHH-8167" )
2222
public void testAnnotatedFormWithBeanValidationNotNull() {
2323
Configuration cfg = new Configuration();
24-
cfg.addAnnotatedClass( AnnotatedMaster.class ).addAnnotatedClass( AnnotatedDetail.class );
24+
cfg.addAnnotatedClass( AnnotatedRoot.class ).addAnnotatedClass( AnnotatedDetail.class );
2525
cfg.buildSessionFactory().close();
2626
}
2727
}

hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedMaster.java renamed to hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedRoot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @author Steve Ebersole
2323
*/
2424
@Entity
25-
public class AnnotatedMaster {
25+
public class AnnotatedRoot {
2626
@Id
2727
private Integer id;
2828
private String name;

hibernate-core/src/test/java/org/hibernate/test/formulajoin/Detail.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
public class Detail implements Serializable {
1616
private Long id;
17-
private Master master;
17+
private Root root;
1818
private int version;
1919
private String details;
2020
private boolean currentVersion;
@@ -37,11 +37,11 @@ public Long getId() {
3737
public void setId(Long id) {
3838
this.id = id;
3939
}
40-
public Master getMaster() {
41-
return master;
40+
public Root getRoot() {
41+
return root;
4242
}
43-
public void setMaster(Master master) {
44-
this.master = master;
43+
public void setRoot(Root root) {
44+
this.root = root;
4545
}
4646
public int getVersion() {
4747
return version;

hibernate-core/src/test/java/org/hibernate/test/formulajoin/FormulaJoinTest.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@
2424
*/
2525
public class FormulaJoinTest extends BaseCoreFunctionalTestCase {
2626
public String[] getMappings() {
27-
return new String[] { "formulajoin/Master.hbm.xml" };
27+
return new String[] { "formulajoin/Root.hbm.xml" };
2828
}
2929

3030
@Test
3131
public void testFormulaJoin() {
3232
Session s = openSession();
3333
Transaction tx = s.beginTransaction();
34-
Master master = new Master();
35-
master.setName("master 1");
34+
Root root = new Root();
35+
root.setName("root 1");
3636
Detail current = new Detail();
3737
current.setCurrentVersion(true);
3838
current.setVersion(2);
39-
current.setDetails("details of master 1 blah blah");
40-
current.setMaster(master);
41-
master.setDetail(current);
39+
current.setDetails("details of root 1 blah blah");
40+
current.setRoot( root );
41+
root.setDetail(current);
4242
Detail past = new Detail();
4343
past.setCurrentVersion(false);
4444
past.setVersion(1);
45-
past.setDetails("old details of master 1 yada yada");
46-
past.setMaster(master);
47-
s.persist(master);
45+
past.setDetails("old details of root 1 yada yada");
46+
past.setRoot( root );
47+
s.persist( root );
4848
s.persist(past);
4949
s.persist(current);
5050
tx.commit();
@@ -54,42 +54,42 @@ public void testFormulaJoin() {
5454

5555
s = openSession();
5656
tx = s.beginTransaction();
57-
List l = s.createQuery("from Master m left join m.detail d").list();
57+
List l = s.createQuery("from Root m left join m.detail d").list();
5858
assertEquals( l.size(), 1 );
5959
tx.commit();
6060
s.close();
6161

6262
s = openSession();
6363
tx = s.beginTransaction();
64-
l = s.createQuery("from Master m left join fetch m.detail").list();
64+
l = s.createQuery("from Root m left join fetch m.detail").list();
6565
assertEquals( l.size(), 1 );
66-
Master m = (Master) l.get(0);
67-
assertEquals( "master 1", m.getDetail().getMaster().getName() );
68-
assertTrue( m==m.getDetail().getMaster() );
66+
Root m = (Root) l.get(0);
67+
assertEquals( "root 1", m.getDetail().getRoot().getName() );
68+
assertTrue( m==m.getDetail().getRoot() );
6969
tx.commit();
7070
s.close();
7171

7272
s = openSession();
7373
tx = s.beginTransaction();
74-
l = s.createQuery("from Master m join fetch m.detail").list();
74+
l = s.createQuery("from Root m join fetch m.detail").list();
7575
assertEquals( l.size(), 1 );
7676
tx.commit();
7777
s.close();
7878

7979
s = openSession();
8080
tx = s.beginTransaction();
81-
l = s.createQuery("from Detail d join fetch d.currentMaster.master").list();
81+
l = s.createQuery("from Detail d join fetch d.currentRoot.root").list();
8282
assertEquals( l.size(), 2 );
8383
tx.commit();
8484
s.close();
8585

8686
s = openSession();
8787
tx = s.beginTransaction();
88-
l = s.createQuery("from Detail d join fetch d.currentMaster.master m join fetch m.detail").list();
88+
l = s.createQuery("from Detail d join fetch d.currentRoot.root m join fetch m.detail").list();
8989
assertEquals( l.size(), 2 );
9090

9191
s.createQuery("delete from Detail").executeUpdate();
92-
s.createQuery("delete from Master").executeUpdate();
92+
s.createQuery("delete from Root").executeUpdate();
9393

9494
tx.commit();
9595
s.close();

hibernate-core/src/test/java/org/hibernate/test/formulajoin/Master.hbm.xml renamed to hibernate-core/src/test/java/org/hibernate/test/formulajoin/Root.hbm.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<hibernate-mapping package="org.hibernate.test.formulajoin">
2020

21-
<class name="Master" table="t_masters">
21+
<class name="Root" table="t_roots">
2222

2323
<id name="id">
2424
<generator class="increment"/>
@@ -30,7 +30,7 @@
3030
update="false"/>
3131

3232
<many-to-one name="detail"
33-
property-ref="currentMaster"
33+
property-ref="currentRoot"
3434
insert="false"
3535
update="false">
3636
<column name="id"/>
@@ -53,13 +53,13 @@
5353
<property name="version" update="false">
5454
<column name="version"
5555
not-null="true"
56-
unique-key="masterVersion"/>
56+
unique-key="rootVersion"/>
5757
</property>
5858

59-
<properties name="currentMaster">
60-
<many-to-one name="master">
61-
<column name="cur_master"
62-
unique-key="masterVersion"
59+
<properties name="currentRoot">
60+
<many-to-one name="root">
61+
<column name="cur_root"
62+
unique-key="rootVersion"
6363
not-null="true"/>
6464
</many-to-one>
6565
<property name="currentVersion"

hibernate-core/src/test/java/org/hibernate/test/formulajoin/Master.java renamed to hibernate-core/src/test/java/org/hibernate/test/formulajoin/Root.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
55
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
66
*/
7-
8-
//$Id: Master.java 4602 2004-09-26 11:42:47Z oneovthafew $
97
package org.hibernate.test.formulajoin;
8+
109
import java.io.Serializable;
1110

1211
/**
1312
* @author Gavin King
1413
*/
15-
public class Master implements Serializable {
14+
public class Root implements Serializable {
1615
private Long id;
1716
private String name;
1817
private Detail detail;

hibernate-core/src/test/java/org/hibernate/test/hql/DeleteQuerySubqueryReferencingTargetPropertyTest.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@ public class DeleteQuerySubqueryReferencingTargetPropertyTest extends BaseEntity
2121

2222
@Override
2323
protected Class<?>[] getAnnotatedClasses() {
24-
return new Class<?>[] { Master.class, Detail.class };
24+
return new Class<?>[] { Root.class, Detail.class };
2525
}
2626

2727
@Test
2828
public void testSubQueryReferencingTargetProperty() {
2929
// prepare
3030
doInJPA( this::entityManagerFactory, entityManager -> {
31-
Master m1 = new Master();
31+
Root m1 = new Root();
3232
entityManager.persist( m1 );
3333
Detail d11 = new Detail( m1 );
3434
entityManager.persist( d11 );
3535
Detail d12 = new Detail( m1 );
3636
entityManager.persist( d12 );
3737

38-
Master m2 = new Master();
38+
Root m2 = new Root();
3939
entityManager.persist( m2 );
4040
} );
4141

4242
doInJPA( this::entityManagerFactory, entityManager -> {
43-
// depending on the generated ids above this delete removes all masters or nothing
44-
// removal of all masters results in foreign key constraint violation
45-
// removal of nothing is incorrect since 2nd master does not have any details
43+
// depending on the generated ids above this delete removes all Roots or nothing
44+
// removal of all Roots results in foreign key constraint violation
45+
// removal of nothing is incorrect since 2nd Root does not have any details
4646

4747
// DO NOT CHANGE this query: it used to trigger a very specific bug caused
4848
// by the alias not being added to the generated query
49-
String d = "delete from Master m where not exists (select d from Detail d where d.master=m)";
49+
String d = "delete from Root m where not exists (select d from Detail d where d.root=m)";
5050
Query del = entityManager.createQuery( d );
5151
del.executeUpdate();
5252

53-
// so check for exactly one master after deletion
53+
// so check for exactly one Root after deletion
5454
CriteriaBuilder builder = entityManager.getCriteriaBuilder();
55-
CriteriaQuery<Master> query = builder.createQuery( Master.class );
56-
query.select( query.from( Master.class ) );
55+
CriteriaQuery<Root> query = builder.createQuery( Root.class );
56+
query.select( query.from( Root.class ) );
5757
Assert.assertEquals( 1, entityManager.createQuery( query ).getResultList().size() );
5858
} );
5959
}
6060

61-
@Entity(name = "Master")
62-
public static class Master {
61+
@Entity(name = "Root")
62+
public static class Root {
6363
@Id
6464
@GeneratedValue
6565
private Integer id;
@@ -72,10 +72,10 @@ public static class Detail {
7272
private Integer id;
7373

7474
@ManyToOne(optional = false)
75-
private Master master;
75+
private Root root;
7676

77-
public Detail(Master master) {
78-
this.master = master;
77+
public Detail(Root root) {
78+
this.root = root;
7979
}
8080
}
8181
}

hibernate-core/src/test/java/org/hibernate/test/hql/HQLTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ public void testMultipleElementAccessorOperators() throws Exception {
445445
public void testKeyManyToOneJoin() {
446446
//TODO: new parser generates unnecessary joins (though the query results are correct)
447447
assertTranslation( "from Order o left join fetch o.lineItems li left join fetch li.product p" );
448-
assertTranslation( "from Outer o where o.id.master.id.sup.dudu is not null" );
449-
assertTranslation( "from Outer o where o.id.master.id.sup.dudu is not null" );
448+
assertTranslation( "from Outer o where o.id.root.id.sup.dudu is not null" );
449+
assertTranslation( "from Outer o where o.id.root.id.sup.dudu is not null" );
450450
}
451451

452452
@Test
@@ -670,7 +670,7 @@ public void testFetchList() throws Exception {
670670

671671
@Test
672672
public void testCollectionFetchWithExplicitThetaJoin() {
673-
assertTranslation( "select m from Master m1, Master m left join fetch m.details where m.name=m1.name" );
673+
assertTranslation( "select m from Root m1, Root m left join fetch m.details where m.name=m1.name" );
674674
}
675675

676676
@Test

0 commit comments

Comments
 (0)