|
Hibernate example source code file (VersionsJoinTableRangeComponent.java)
The Hibernate VersionsJoinTableRangeComponent.java source codepackage org.hibernate.envers.test.integration.naming; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Embeddable; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import org.hibernate.annotations.FetchMode; /** * An embeddable component containing a list of * {@link VersionsJoinTableRangeTestEntitySuperClass}-instances * * @author Erik-Berndt Scheper * @param <T> */ @Embeddable public final class VersionsJoinTableRangeComponent<T extends VersionsJoinTableRangeTestEntitySuperClass> { @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) @org.hibernate.annotations.Fetch(value = FetchMode.SUBSELECT) @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN) @JoinColumn(name = "VJTRCTE_ID", insertable = true, updatable = false, nullable = false) // Note: If this is processed without override annotation, then we should get a // org.hibernate.DuplicateMappingException: // Duplicate class/entity mapping JOIN_TABLE_COMPONENT_1_AUD @org.hibernate.envers.AuditJoinTable(name = "JOIN_TABLE_COMPONENT_1_AUD", inverseJoinColumns = @JoinColumn(name = "VJTRTE_ID")) private List<T> range = new ArrayList Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate VersionsJoinTableRangeComponent.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.