[TYPO3-german] Extbase Mapping eigene Tabelle

arianesardinas asardinas at gmx.de
Thu Feb 13 21:04:45 CET 2014


Hallo Leute

Ich möchte in einer Extbase-Extension meine eigene Tabelle dt_nation einbinden.
ich bekomme den fehler:
Fatal error: Call to a member function fetch_assoc() on a non-object in /html/typo3/typo3_src-6.1.5/typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1348

im Typoscript steht folgendes:

plugin.tx_jobsdfu.persistence.classes {
	TYPO3/JobsDfu/Domain/Model/Nation {
		mapping {
			tableName =  dt_nation
                    columns { 
                    	id.mapOnProperty = id
               			nation.mapOnProperty = nation 
            		} 
		}
	}
}

Im Model: 
class Nation extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {

	/**
	 * nation
	 *
	 * @var \string
	 * 
	 */
	protected $nation;
	
	/**
	 * id
	 *
	 * @var \string
	 * 
	 */
	protected $id;

	/**
	 * Returns the nation
	 *
	 * @return \string $nation
	 */
	public function getNation() {
		return $this->nation;
	}

	/**
	 * Sets the nation
	 *
	 * @param \string $nation
	 * @return void
	 */
	public function setNation($nation) {
		$this->nation = $nation;
	}
	
	
	/**
	 * Returns the id
	 *
	 * @return \string $id
	 */
	public function getId() {
		return $this->id;
	}

	/**
	 * Sets the id
	 *
	 * @param \string $id
	 * @return void
	 */
	public function setId($id) {
		$this->id = $id;
	}
	

}
im Controller:

/**
	 * nationRepository
	 *
	 * @var \TYPO3\JobsDfu\Domain\Repository\NationRepository
	 * @inject
	 */
	protected $nationRepository;
public function nationAction() {
$this->nationRepository->findAll()
}
hat jemand eine idee warum?


More information about the TYPO3-german mailing list