geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r752864 - /geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
Date Thu, 12 Mar 2009 13:49:53 GMT
Author: dwoods
Date: Thu Mar 12 13:49:53 2009
New Revision: 752864

URL: http://svn.apache.org/viewvc?rev=752864&view=rev
Log:
DAYTRADER-63 OrderDataBean @OneToOne mapping to HoldingDataBean causes sell operation failed.
 Applied patch from Forrest Xia.

Modified:
    geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java

Modified: geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java?rev=752864&r1=752863&r2=752864&view=diff
==============================================================================
--- geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
(original)
+++ geronimo/daytrader/trunk/modules/ejb/src/main/java/org/apache/geronimo/samples/daytrader/OrderDataBean.java
Thu Mar 12 13:49:53 2009
@@ -39,7 +39,8 @@
     @NamedQuery(name = "orderejb.findByOrderid", query = "SELECT o FROM orderejb o WHERE
o.orderID = :orderid"),
     @NamedQuery(name = "orderejb.findByAccountAccountid", query = "SELECT o FROM orderejb
o WHERE o.account.accountID = :accountAccountid"),
     @NamedQuery(name = "orderejb.findByQuoteSymbol", query = "SELECT o FROM orderejb o WHERE
o.quote.symbol = :quoteSymbol"),
-    @NamedQuery(name = "orderejb.findByHoldingHoldingid", query = "SELECT o FROM orderejb
o WHERE o.holding.holdingID = :holdingHoldingid"),
+    // Never used query related to FK constraint on holdingejb. the FK constraint will cause
EJB3 runtime mode failure. So comment it.
+    //@NamedQuery(name = "orderejb.findByHoldingHoldingid", query = "SELECT o FROM orderejb
o WHERE o.holding.holdingID = :holdingHoldingid"),
     @NamedQuery(name = "orderejb.closedOrders", query = "SELECT o FROM orderejb o WHERE o.orderStatus
= 'closed' AND o.account.profile.userID  = :userID"),
     @NamedQuery(name = "orderejb.completeClosedOrders", query = "UPDATE orderejb o SET o.orderStatus
= 'completed' WHERE o.orderStatus = 'closed' AND o.account.profile.userID  = :userID")
 })
@@ -89,8 +90,11 @@
     @JoinColumn(name="QUOTE_SYMBOL")
     private QuoteDataBean quote;
     
-    @OneToOne(fetch=FetchType.LAZY)
-    @JoinColumn(name = "HOLDING_HOLDINGID")
+    // Cause sell operation failed, see JIRA DAYTRADER-63 for details.
+    //@OneToOne(fetch=FetchType.LAZY)
+    //@JoinColumn(name = "HOLDING_HOLDINGID")
+    // Cause sell operation failed, see JIRA DAYTRADER-63 for details.
+    @Transient    
     private HoldingDataBean holding;
 
 //    @Version



Mime
View raw message