You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Matthieu Chastel (JIRA)" <ji...@apache.org> on 2016/07/12 10:17:20 UTC

[jira] [Created] (OPENJPA-2649) Enhancement failed for Inheritance (InheritanceType.TABLE_PER_CLASS)

Matthieu Chastel created OPENJPA-2649:
-----------------------------------------

             Summary: Enhancement failed for Inheritance (InheritanceType.TABLE_PER_CLASS)
                 Key: OPENJPA-2649
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2649
             Project: OpenJPA
          Issue Type: Bug
          Components: Enhance
    Affects Versions: 2.4.1
            Reporter: Matthieu Chastel
            Priority: Blocker


We have tried to update openjpa version from 2.2.0 to 2.4.1.
A blocking error occurred in version 2.4.1 (works in 2.4.0)
Enhancement of Inheritance class failed:

Example:

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Vehicule{
  @Id
  @Column(name = "VEHICULE_ID")
  private int vehiculeId;

  @Id
  @Column(name = "BRAND")
  private String brand;
//get and set methods
...
}

Two child class:

@Entity
@Table(name="TRUCK")
public class Truck extends Vehicule{
 
	private int noOfContainers;
 
	public int getNoOfContainers() {
		return noOfContainers;
	}
 
	public void setNoOfContainers(int noOfContainers) {
		this.noOfContainers = noOfContainers;
	}
}

@Entity
@Table(name="CAR")
public class Car extends Vehicule{
 
	private int noOfDoors;
 
	public int getNoOfDoors() {
		return noOfDoors;
	}
 
	public void setNoOfDoors(int noOfDoors) {
		this.noOfDoors = noOfDoors;
	}
}






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)