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:

Data Model Questions /

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

DataObject::request


Go to End


3 Posts   2035 Views

Avatar
jahbini

Community Member, 13 Posts

30 May 2009 at 7:01am

I have a need to build up a special purpose request, in the manner of DataObject::request as mentioned in the recipe datamodel link http://doc.silverstripe.org/doku.php?id=datamodel

However, I get a 'not found' error for this function. I looked in the core model classes, but could not find any dataobjectrequest class, nor any method of the DataObject class named 'request'

In the past, I have been led off-track by my 'dyslexic' reading of the documentation, code and forums into paths of confusion. Again, I am unable to resolve the intent with the reality.

Any hints on where I should look for authoritative source code on DataObject::request ?

Avatar
Ingo

Forum Moderator, 801 Posts

2 June 2009 at 10:07am

Sorry, the documentation was outdated in this case, request() is no longer available. Not sure what "special purpose" you're referring to, but you can express the same stuff through a custom SQLQuery object. For this type of "fluent" API, we're planning to create a new "DataMapper" class (see http://open.silverstripe.com/ticket/2986)

Avatar
jahbini

Community Member, 13 Posts

2 June 2009 at 10:52am

Thanks for the information on the obsolete documentation -- Shall I, or have you already put in a ticket request to update the recipe referring to DataObject::request.

Also, I'm happy to know you are actively brainstorming new 'lazy' query models for a future version of SilverStripe. I'll keep looking for it.

During the interim, I'll start looking for solid documentation on the SQLQuery object. Thanks.