Hi,
I have the following structure:
class SomePage extends Page {
static $has_one => array(
'SomeImages' => 'SomeImage'
);
static $has_many => array(
'SomeDataObjects' => 'SomeDataObject'
);
}
...
class SomeDataObject extends DataObject {
static $has_one => array(
'SomePages' => 'SomePage',
'SomeImages' => 'SomeImage'
);
}
class SomeImage extends DataObjectDecorator {
function extraStatics() {
return array(
'db' => array(
'Copyright' => 'Varchar(50)'
)
);
}
}
Since copyrights directly belong to one specific image, and since they should be set ideally together with uploading an image (either related to SomePage or SomeDataObject, that shouldn't matter), I would like to create a TextField in SomePage and SomeDataObject that writes and gets it's values directly to and from the Copyright db-field in SomeImage.
My question: is this possible and how...?