Hi
I saving an dataobject 'userbrille' via a frontend form.
The dataobject includes a has_one relation to file.
After saving a new 'userbrille' I want to access the file wich is an image
to resize it. But I don't know who to do it.
the object:
static $db = array (
'Name' => 'Text',
'Email' => 'Text'
);
static $has_one = array (
'Bild' => 'File'
);
saving a new UserBrille:
$neuesBild = new UserBrille();
$neuesBild->setField('Name',$data->getVar('Name'));
$neuesBild->setField('Email',$data->getVar('Email'));
$neuesBild->setField('BildID',$data->getVar('BildID'));
$neuesBild->write();
//return $neuesBild->renderWith(array('UserBrillePageCrop'));
--->>??ACCESS TO THE FILE
return $neuesBild->relObject('File.Filename');
This produces an error:
UNable to travers to related object field.
Thanks in advance for any advice
Salut
Lukin