Hi, I have an 1-N relationship between 2 CMP EJBs, Matches and Leagues, which is set correctly (XDoclet generated). A league can have several matches, and a match can only have one league.
I'm trying to retrieve the league name, which is a league EJB field, while I'm listing every matches. e.g. : team 1 vs team 2 - League 1 team 3 vs team 4 - League 2... Here is the descriptor for the relationship. | <ejb-relation > | <ejb-relation-name>MatchesLeaguesRelation</ejb-relation-name> | | <ejb-relationship-role > | <ejb-relationship-role-name>MatchesHasLeague</ejb-relationship-role-name> | <multiplicity>Many</multiplicity> | <relationship-role-source > | <ejb-name>Matches</ejb-name> | </relationship-role-source> | <cmr-field > | <cmr-field-name>league</cmr-field-name> | </cmr-field> | </ejb-relationship-role> | | <ejb-relationship-role > | <ejb-relationship-role-name>LeagueHasMatches</ejb-relationship-role-name> | <multiplicity>One</multiplicity> | <relationship-role-source > | <ejb-name>Leagues</ejb-name> | </relationship-role-source> | <cmr-field > | <cmr-field-name>matches</cmr-field-name> | <cmr-field-type>java.util.Collection</cmr-field-type> | </cmr-field> | </ejb-relationship-role> | </ejb-relation> | I have a finder in the League EJB, which can retrieve all the matches of a League | * @ejb.finder signature="java.util.Collection findMatches(java.lang.String aLeagueId)" | * query = "SELECT OBJECT(M) FROM League L, IN (L.match) AS M WHERE L.LeagueId = ?1" | But I don't know how to have the League name while I'm listing the matches!!!... Perhaps, I have pissed something with XDoclet ? Can someone help me? Thanks a lot View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838795#3838795 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838795 ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
