Bugs item #1104763, was opened at 2005-01-18 19:57
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1104763&group_id=22866
Category: JBossServer
Group: v4.0
Status: Open
Resolution: None
Priority: 5
Submitted By: wilsonpu (wilsonpu)
Assigned to: Nobody/Anonymous (nobody)
Summary: EJB-QL CMR traversal returns wrong interface type
Initial Comment:
Hello,
JBOSS AS returns/contains wrong interface type with
CMR traversal using EJB-QL.
We recreated the line item example from Mastering
EJB Appendix D on EJB-QL entity bean relationship
traversal (page 574).
Test case below. Codes are attached to ease table data
creatation.
We created 3 tables:
Customer
---------
customerId (pk)
name
Order
---------
orderId (pk)
customerId (fk)
date
LineItem
---------
lineItemId (pk)
orderId (fk)
sku
quantity
On the CustomerBean, we defined a finder method using
Xdoclet.
@ejb.finder
signature="Collection
findCustomerLineItems(int customerId)"
unchcked="true"
query="SELECT OBJECT(l) FROM Customer AS c,
IN(c.orders) o, IN (o.lineItems) l WHERE c.customerId=?1"
result-type-mapping="Local"
We also defined CMR for getting the orders from the
customer bean and getting the lineitems from the order
bean. (codes are attached)
Base on the finder method, we are expecting to return a
collection of LineItemLocal interface. However, we got
CustomerLocal interface instead.
The codes are attached with DB data. However, you will
have to separate the codes to different file.
Wilson Pu
[EMAIL PROTECTED]
Software Developer
Vision Solutions Inc.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1104763&group_id=22866
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development