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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   2723 Views

Avatar
xmedeko

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.

Avatar
Matt

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).