|
Mantis - Resin
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 276 | minor | always | 06-20-05 00:00 | 11-30-05 14:42 | |
|
|
|||||
| Reporter: | user241 | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | urgent | OS Version: | |||
| Status: | closed | Product Version: | 3.0.13 | ||
| Product Build: | 3.0.13 | Resolution: | fixed | ||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.0.15 | ||
|
|
|||||
| Summary: | 0000276: order-by clause ignored in many-to-many ejb-relations | ||||
| Description: |
RSN-311 This works in resin 2.x. but does not work in resin 3. The order-by clause in the 1st relation below is ignored when i call topic.getNewsItemsByCMR. The sql generated is "SELECT caucho1.storyid, caucho1.url, caucho1.headline, caucho1.source, caucho1.timestamp FROM storytopic caucho0, story caucho1 WHERE (caucho0.storyid = caucho1.storyid) AND (caucho0.topic = ?))" ... there is no order by newsId desc Note that order-by clauses *are* correctly utilized in many-to-one calls, such as the 2nd relation below. In this case the sql generated is "SELECT c.intradeid, c.day, c.price, c.name, c.relation, c.shares, c.symbolid, c.toprice, c.tradetype FROM intrade c WHERE (c.symbolid = ?) ORDER BY c.day DESC" <ejb-relation> <ejb-relation-name>storytopic</ejb-relation-name> <ejb-relationship-role> <multiplicity>Many</multiplicity> <relationship-role-source> <ejb-name>topics</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>newsItemsByCMR</cmr-field-name> <sql-column>topic</sql-column> </cmr-field> <order-by>newsId desc</order-by> </ejb-relationship-role> <ejb-relationship-role> <multiplicity>Many</multiplicity> <relationship-role-source> <ejb-name>newsItems</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>topics</cmr-field-name> <sql-column>storyid</sql-column> </cmr-field> </ejb-relationship-role> </ejb-relation> <ejb-relation> <ejb-relationship-role> <relationship-role-source> <ejb-name>symbols</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>insiderActivity</cmr-field-name> </cmr-field> <multiplicity>One</multiplicity> <order-by>date desc</order-by> </ejb-relationship-role> <ejb-relationship-role> <relationship-role-source> <ejb-name>insideractivity</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>symbol</cmr-field-name> <sql-column>symbolid</sql-column> </cmr-field> <multiplicity>Many</multiplicity> </ejb-relationship-role> </ejb-relation> |
||||
| Steps To Reproduce: | |||||
| Additional Information: | 3.0.13 pro. all platforms | ||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||