Add no fields to the tx_news model from another ext

375 views Asked by At

I used this to extend tx_news: http://docs.typo3.org/typo3cms/extensions/news/latest/Main/Tutorial/ExtendingNews/Index.html

So I created a Class/Domain/Model/News.php and a Ressources/Private/extend-news.txt. And I also find the file typo3temp/Cache/Code/cache_phpcode/Domain_Model_News.php with my content in it:

/***********************************************************************
    this is partial from: /var/www/vhosts/xx.ch/development/typo3conf/ext/template_xx/Classes/Domain/Model/News.php
***********************************************************************/
/**
 * @var int
 */
protected $txSogexpandnewsHoehe;


/**
 * Get Hoehe
 *
 * @return int
 */
public function getTxSogexpandnewsHoehe() {
    return $this->txSogexpandnewsHoehe;
}

The field is in the database, added with ext_tables.sql

CREATE TABLE tx_news_domain_model_news (
    tx_sogexpandnews_favorit boolean
    tx_sogexpandnews_hoehe int
);

The field has the value "2" in the database, but I dont get any value and a vardump returns NULL

var_dump($news->getTxSogexpandnewsHoehe());

What do I miss?

0

There are 0 answers