Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

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

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

DataObject get() and get_one() has different syntax for sorting

Go to End

2 Posts   2537 Views


Community Member, 94 Posts

28 May 2007 at 11:20am

Edited: 28/05/2007 11:33am

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.


Community Member, 86 Posts

31 May 2007 at 12:11am

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