Doctrine Project

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Doctrine 2 - ORM
  • Doctrine 2 - ORM
  • DDC-195

Ordering of associations

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-ALPHA3
  • Fix Version/s: 2.0-BETA1
  • Component/s: Mapping Drivers, ORM
  • Security Level: All
  • Labels:
    None

Description

It should be supported to set a default ordering for associations.

Example:

/**
 * @OneToMany(targetEntity="Thing", mappedBy="other")
 * @OrderBy("foo_bar ASC, other_bar DESC")
 */
private $things;

The value of the orderby mapping declaration should be a simple DQL snippet.

Main classes to adjust for this feature: SqlWalker, StandardEntityPersister and the metadata drivers, of course.

Issue Links

depends on

Improvement - An improvement or enhancement to an existing feature or task. DDC-335 Refactor DQL EBNF to use JOIN FETCH as syntax for fetch joins only

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.
is duplicated by

New Feature - A new feature of the product, which has yet to be developed. DDC-181 Order of many-to-many relationship

  • Major - Major loss of function.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.
relates to

Sub-task - The sub-task of the issue DDC-293 Patch for "orderBy" attribute for @ManyToMany

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Resolved - A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.
  • Options
    • Show All
    • Show Open
Progress
Resolved Sub-Tasks

Sub-Tasks

1.
Patch for "orderBy" attribute for @ManyToMany Sub-task Resolved Resolved Benjamin Eberlei
 
2.
Add @OrderBy(sql) to Mapping Drivers Sub-task Resolved Resolved Benjamin Eberlei
 
3.
Add ORDER BY clause to collection persister SQL generation Sub-task Resolved Resolved Benjamin Eberlei
 
4.
Change DQL Parser to comply with ordered collections Sub-task Resolved Resolved Benjamin Eberlei
 

Activity

  • All
  • Comments
  • History
  • Activity
  • Source

People

  • Assignee:
    Benjamin Eberlei
    Reporter:
    Roman S. Borschel
Vote (1)
Watch (1)

Dates

  • Created:
    06/Dec/09 9:05 PM
    Updated:
    26/Feb/10 4:28 PM
    Resolved:
    26/Feb/10 4:28 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Doctrine Project. Try JIRA - bug tracking software for your team.