Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » DataObject get() and get_one() has different syntax for sorting

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 2157 Views
  • xmedeko
    Avatar
    Community Member
    94 Posts

    DataObject get() and get_one() has different syntax for sorting Link to this post

    Sorry, the problem was in my code, and not in SS. So I have edited this post later (I cannot delete it).

    Anyway, DataObject::get(...) has the $sort argument, but DataObject::get_one(...) has the $orderby argument. Both arguments have the same functionality, but different names, which is a little bit confusing.

  • Matt
    Avatar
    Core Development Team
    84 Posts

    Re: DataObject get() and get_one() has different syntax for sorting Link to this post

    Andy: This is probably a good candidate for fixing in your doc updates for the core (assuming you haven't already done it).

    2157 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.