[TYPO3-dev] Map pages to model Pages
Olle Haerstedt
o.haerstedt at bitmotion.de
Mon Nov 17 16:22:19 CET 2014
Hi!
There's a couple of results on Google on this issue, but none
which worked for me. So here goes.
I want to map table `pages` to a model `Pages`. I store them in
an ObjectStorage, and this works, I get the right uid when I do a
debug in the Fluid view. What doesn't work is mapping other fields,
like `title`. I've added getters and setters for this, and also Typoscript:
config.tx_extbase.persistence.classes {
Vendor/Products/Domain/Model/Pages {
mapping {
tableName = pages
columns {
title.mapOnProperty = title
}
}
}
}
class Pages extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
/**
* Title
*
* @var string
*/
protected $title;
/**
* Get title
*
* @return string
*/
public function getTitle() {
return $this->title;
}
/**
* Set title
*
* @param string $title
* @return void
*/
public function setTitle($title) {
$this->title = $title;
}
}
Any ideas what I miss?
More information about the TYPO3-dev
mailing list