]
SYARHEI MELESHKEVICH commented on EJBTHREE-753:
-----------------------------------------------
More details in my post
Incorect SQL with Compound Primary Keys
---------------------------------------
Key: EJBTHREE-753
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-753
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Environment: Tested on JBoss 4.0.4GA and jboss-EJB-3.0_Embeddable_ALPHA_9
Reporter: SYARHEI MELESHKEVICH
Priority: Blocker
Incorect SQL with duplicate columns generates when deployng example from Java EE 5
Tutorial
http://java.sun.com/javaee/5/docs/tutorial/doc/PersistenceEJB2.html
@IdClass(order.entity.LineItemKey.class)
@Entity
@Table(name = "EJB_ORDER_LINEITEM")
public class LineItem {
@Id
public int getItemId() {
return itemId;
}
@Id
@Column(name="ORDERID", nullable=false, insertable=false, updatable=false)
public Integer getOrderId() {
return orderId;
}
}
public final class LineItemKey implements java.io.Serializable {
private Integer orderId;
private int itemId;
...
public Integer getOrderId() {
return orderId;
}
...
}
generates:
insert into EJB_ORDER_LINEITEM (ORDERID, quantity, VENDORPARTNUMBER, orderId, itemId)
values (?, ?, ?, ?, ?)
ORDERID comes from LineItem class and orderId from LineItemKey.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: