package entity.ejb;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;

import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Orderspecification")
public class Orderspecification {
	
	private String pNumberONumber;
	private Order order;
	private Product product;

	@EmbeddedId
	public String getpNumberONumber() {
		return pNumberONumber;
	}

	public void setpNumberONumber(String pNumberONumber) {
		this.pNumberONumber = pNumberONumber;
	}

	@ManyToOne
	@JoinColumns({ @JoinColumn(name = "pNumber", referencedColumnName = "oNumber"),
			@JoinColumn(name = "oNumber", referencedColumnName = "oNumber") })
	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}
	@ManyToOne
	@JoinColumns({ @JoinColumn(name = "iNumber", referencedColumnName = "pNumber"),
			@JoinColumn(name = "pNumber", referencedColumnName = "pNumber") })
	public Product getProduct() {
		return product;
	}
	
	public void setProduct(Product product) {
		this.product = product;
	}
	

}
@@ -683,24 +683,63 @@
  = %22oNumber%22
+, insertable = false, updatable = false
 ),%0D%0A%09%09%09@Join
@@ -791,24 +791,63 @@
  = %22oNumber%22
+, insertable = false, updatable = false
 ) %7D)%0D%0A%09publi
@@ -1047,16 +1047,55 @@
 pNumber%22
+, insertable = false, updatable = false
 ),%0D%0A%09%09%09@
@@ -1155,16 +1155,55 @@
 pNumber%22
+, insertable = false, updatable = false
 ) %7D)%0D%0A%09p

insertable = false, updatable = false