HHH-2872 reverting an incorrect test case

This commit is contained in:
Brett Meyer 2013-05-20 17:36:30 -04:00
parent 91758f74ff
commit ce77f15974
4 changed files with 0 additions and 188 deletions

View File

@ -1,47 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* JBoss, Home of Professional Open Source
* Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.hibernate.test.annotations.join;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
/**
* @author Brett Meyer
*/
@TestForIssue( jiraKey = "HHH-2872" )
public class JoinOrderingTest extends BaseCoreFunctionalTestCase {
@Override
protected Class<?>[] getAnnotatedClasses() {
// This is the important piece. ProductDetails must be first to
// reproduce the issue.
// return new Class<?>[] { ProductDetails.class, Product.class, ProductVersion.class };
// TODO: commented out -- @FailureExpected wasn't working on builds
// if it's a MappingException.
return new Class<?>[] { };
}
@Test
public void testEntityOrderingWithJoins() {
// nothing to do
}
}

View File

@ -1,53 +0,0 @@
package org.hibernate.test.annotations.join;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
@Entity
@Table(name = "product", uniqueConstraints = @UniqueConstraint(columnNames = "code"))
public class Product {
@Id
@GeneratedValue
@Column(name = "id_product")
private Integer id;
@ManyToOne(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
@JoinColumn(name = "id_product_version", nullable = false)
private ProductVersion productVersion;
@Column(name = "code", unique = true, nullable = false, precision = 4, scale = 0)
private Long code;
public Integer getId() {
return this.id;
}
public void setId(final Integer id) {
this.id = id;
}
public ProductVersion getProductVersion() {
return this.productVersion;
}
public void setProductVersion(final ProductVersion productVersion) {
this.productVersion = productVersion;
}
public Long getCode() {
return this.code;
}
public void setCode(final Long code) {
this.code = code;
}
}

View File

@ -1,43 +0,0 @@
package org.hibernate.test.annotations.join;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name = "product_details")
public class ProductDetails {
@Id
@GeneratedValue
@Column(name = "id_product_details")
private Integer id;
@ManyToOne(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
@JoinColumns({ @JoinColumn(name = "id_product", referencedColumnName = "id_product", nullable = false),
@JoinColumn(name = "id_product_version", referencedColumnName = "id_product_version", nullable = false) })
private Product product;
public Integer getId() {
return this.id;
}
public void setId(final Integer id) {
this.id = id;
}
public Product getProduct() {
return this.product;
}
public void setProduct(final Product product) {
this.product = product;
}
}

View File

@ -1,45 +0,0 @@
package org.hibernate.test.annotations.join;
import static javax.persistence.GenerationType.IDENTITY;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name = "product_version")
public class ProductVersion {
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id_product_version", unique = true, nullable = false)
private Integer id;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "productVersion", cascade = {CascadeType.ALL})
private List<Product> products = new ArrayList<Product>(0);
public Integer getId() {
return this.id;
}
public void setId(final Integer id) {
this.id = id;
}
public List<Product> getProducts() {
return this.products;
}
public void setProducts(final ArrayList<Product> products) {
this.products = products;
}
}