[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-753) Incorect SQL with Compound Primary Keys

SYARHEI MELESHKEVICH (JIRA) jira-events at jboss.com
Thu Oct 19 16:59:41 EDT 2006


    [ http://jira.jboss.com/jira/browse/EJBTHREE-753?page=comments#action_12345547 ] 
            
SYARHEI MELESHKEVICH commented on EJBTHREE-753:
-----------------------------------------------

More details in my post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=92964

> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list