Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b8922cd
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 May 29, 2026
65d02c0
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 8, 2026
5380ad0
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 8, 2026
24df237
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 8, 2026
6730932
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 8, 2026
8e6acb1
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 8, 2026
ea1766e
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 13, 2026
b8bfd8f
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 13, 2026
93b6448
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 13, 2026
7ccd292
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 15, 2026
876f9d4
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 15, 2026
b772484
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 21, 2026
688d2dc
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 21, 2026
d504273
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 21, 2026
ae52074
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 22, 2026
362d824
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 22, 2026
aa8d239
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 22, 2026
477ca5d
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 27, 2026
cb9f2f0
HHH-20589 Deleted unused hbm files
dreab8 Jul 28, 2026
e89a963
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 28, 2026
69ec0a0
HHH-20589 Continue switching tests
dreab8 Jul 28, 2026
3241883
HHH-20589 Continue switching tests using hbm.xml to use mapping.xml
dreab8 Jul 31, 2026
d73fb60
HHH-20589 continue switching hbm tests
dreab8 Aug 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class ProductLine {
private Integer id;
private String description;
private Set models = new HashSet();
private Set<Model> models = new HashSet<>();

public ProductLine() {
}
Expand All @@ -33,10 +33,10 @@ public Integer getId() {
public void setId(Integer id) {
this.id = id;
}
public Set getModels() {
public Set<Model> getModels() {
return models;
}
public void setModels(Set models) {
public void setModels(Set<Model> models) {
this.models = models;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
*/
@JiraKey("HHH-2060")
@DomainModel(
xmlMappings = {
"org/hibernate/orm/test/cid/PurchaseRecord.hbm.xml"
}
annotatedClasses = { PurchaseRecord.class, PurchaseDetail.class }
)
@SessionFactory
public class CompositeIdWithGeneratorTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@
*/
package org.hibernate.orm.test.cid;



/**
* @author Jacob Robertson
*/
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.JoinColumns;
import jakarta.persistence.ManyToOne;

@Entity
public class PurchaseDetail {

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "purchaseNumber", nullable = false),
@JoinColumn(name = "purchaseSequence", nullable = false)
})
private PurchaseRecord purchaseRecord;

@Id
private String productId;
private int quantity;

Expand All @@ -21,42 +30,29 @@ public PurchaseDetail(PurchaseRecord record, String productId, int quantity) {
this.quantity = quantity;
this.purchaseRecord = record;
}
public PurchaseDetail() {}

public PurchaseDetail() {}

/**
* @return the purchaseRecord
*/
public PurchaseRecord getPurchaseRecord() {
return purchaseRecord;
}
/**
* @param purchaseRecord the purchaseRecord to set
*/

public void setPurchaseRecord(PurchaseRecord purchaseRecord) {
this.purchaseRecord = purchaseRecord;
}
/**
* @return the quantity
*/

public int getQuantity() {
return quantity;
}
/**
* @param quantity the quantity to set
*/

public void setQuantity(int quantity) {
this.quantity = quantity;
}
/**
* @return the productId
*/

public String getProductId() {
return productId;
}
/**
* @param productId the productId to set
*/

public void setProductId(String productId) {
this.productId = productId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.orm.test.cid;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
* @author Jacob Robertson
*/
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.EmbeddedId;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.OneToMany;

import org.hibernate.annotations.GenericGenerator;

@Entity
public class PurchaseRecord {

@Embeddable
public static class Id implements Serializable {
private int purchaseNumber;
private String purchaseSequence;
Expand All @@ -22,33 +33,26 @@ public Id(int purchaseNumber, String purchaseSequence) {
}
public Id() {}

/**
* @return Returns the purchaseNumber.
*/
public int getPurchaseNumber() {
return purchaseNumber;
}
/**
* @param purchaseNumber The purchaseNumber to set.
*/

public void setPurchaseNumber(int purchaseNumber) {
this.purchaseNumber = purchaseNumber;
}
/**
* @return the purchaseSequence
*/

public String getPurchaseSequence() {
return purchaseSequence;
}
/**
* @param purchaseSequence the purchaseSequence to set
*/

public void setPurchaseSequence(String purchaseSequence) {
this.purchaseSequence = purchaseSequence;
}

public int hashCode() {
return purchaseNumber + purchaseSequence.hashCode();
}

public boolean equals(Object other) {
if (other instanceof Id) {
Id that = (Id) other;
Expand All @@ -61,49 +65,38 @@ public boolean equals(Object other) {
}
}

@EmbeddedId
@GenericGenerator(type = PurchaseRecordIdGenerator.class)
private Id id;

@Column(name = "`timestamp`")
private Date timestamp;
private Set details = new HashSet();

@OneToMany(mappedBy = "purchaseRecord", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
private Set<PurchaseDetail> details = new HashSet<>();

public PurchaseRecord() {}

/**
* @return Returns the id.
*/
public Id getId() {
return id;
}
/**
* @param id The id to set.
*/

public void setId(Id id) {
this.id = id;
}

/**
* @return the details
*/
public Set getDetails() {
public Set<PurchaseDetail> getDetails() {
return details;
}

/**
* @param details the details to set
*/
public void setDetails(Set details) {
public void setDetails(Set<PurchaseDetail> details) {
this.details = details;
}

/**
* @return the timestamp
*/
public Date getTimestamp() {
return timestamp;
}

/**
* @param timestamp the timestamp to set
*/
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,31 @@
*/
package org.hibernate.orm.test.collection.propertyref;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;


@Entity
@Table(name = "t_mail")
public class Mail {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Integer id;

@Column(name = "`alias`", length = 20)
private String alias;

@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST })
@JoinColumn(name = "userid", referencedColumnName = "userid", nullable = false)
private User user;

Mail() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,34 @@
import java.util.HashSet;
import java.util.Set;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;


@Entity
@Table(name = "t_user")
public class User {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Integer id;

@Column(name = "userid", length = 32, nullable = false)
private String userid;

@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
@Fetch(FetchMode.JOIN)
private Set<Mail> mail = new HashSet();

public User() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,31 @@
*/
package org.hibernate.orm.test.collection.propertyref.lazy;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;


@Entity
@Table(name = "t_mail")
public class Mail {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Integer id;

@Column(name = "`alias`", length = 20)
private String alias;

@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST })
@JoinColumn(name = "userid", referencedColumnName = "userid", nullable = false)
private User user;

Mail() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,29 @@
import java.util.HashSet;
import java.util.Set;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;


@Entity
@Table(name = "t_user")
public class User {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Integer id;

@Column(name = "userid", length = 32, nullable = false)
private String userid;

@OneToMany(mappedBy = "user", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<Mail> mail = new HashSet();

public User() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* @author Gavin King
*/
public class ComponentTest extends BaseSessionFactoryFunctionalTest {
public class ComponentTest extends BaseSessionFactoryFunctionalTest {

@Override
public String[] getOrmXmlFiles() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @author Steve Ebersole
*/
@DomainModel(
xmlMappings = "org/hibernate/orm/test/component/cascading/collection/Mappings.hbm.xml"
xmlMappings = "org/hibernate/orm/test/component/cascading/collection/Mappings.orm.xml"
)
@SessionFactory
public class CascadeToComponentCollectionTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void addString(Locale locale, String value) {
}

public String getString(Locale locale) {
return ( String ) strings.get( locale );
return strings.get( locale );
}

public Map<Locale,String> getStringsCopy() {
Expand Down
Loading
Loading