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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

dataQuery:protected


Go to End


775 Views

Avatar
SilverPeed

Community Member, 22 Posts

9 January 2015 at 4:44am

Hello Silverstripe Experts,

i'm working on a system where i can manage Candidates, Contractors and Vacancys.
For the Candidates i have the option to add Files for example a copy of his/here pasport.

I use this code but it is not working, i thing because the ID of the Bijlage is not given. When i print_r($dbFiles) i get dataQuery:protected. Everything is protected except for the title where i'm searching for.

Doe anyone have a clue how i can get the information of Bijlage or how i can delete this DataObject in another way?
Thanks in advance.

while (isset($_POST['Bestand'][$i])){
$test = $_POST['Bestand'][$i];
print_r($test);
$dbFiles = Bijlage::get()->filter(array(
'Title' => $test
));
// $dbFiles->delete();
print_r($dbFiles);
$i++;
}