I'm trying to create a new extension with two tables : Alert with 3 fields : title (string type) content (relation -> we must be able to select a content in the back office) news (relation -> we must be able to select a news from the existing table tx_news_domain_model_news)
AlertUserMM (this table is used to link the Alert table and the User table) Alert (relation with the table Alert) User (relation with the table fe_users)
When I want to save it, I have few errors :
Warning! The configuration for table "pages" is not compatible with extbase. You have to configure it yourself if you want to map to this table (Error 606)
For this error, I can you to save anyway or not
When i delete the relation with the table pages, I have the Typo3 error :
Argument 1 passed to EBT\ExtensionBuilder\Domain\Model\ClassObject\MethodParameter::setTypeHint() must be of the type string, null given, called in /home/dev/rta/htdocs/typo3conf/ext/extension_builder/Classes/Service/ClassBuilder.php on line 394
I don't know where is the probleme, anyone has an idea ?
UPDATE
I managed to make my extension, so I modified my typoscript like this to map the "pages" table:
config.tx_extbase {
persistence {
enableAutomaticCacheClearing = 1
updateReferenceIndex = 0
classes {
Ewill\EwillAlerte\Domain\Model\Contenu {
mapping {
tableName = pages
recordType = Tx_EwillAlerte_Contenu
columns {
uid.mapOnProperty = uid
title.mapOnProperty = title
sorting.mapOnProperty = sorting
}
}
}
Ewill\EwillAlerte\Domain\Model\Actualite {
mapping {
tableName = tx_news_domain_model_news
recordType = Tx_EwillAlerte_Actualite
}
}
Ewill\EwillAlerte\Domain\Model\Utilisateur {
mapping {
tableName = fe_users
recordType = Tx_EwillAlerte_Utilisateur
}
}
}
}
}
But when I install my extension in the extension manager, I have this error :
[SQL Error] line 0, col 22: Error: Expected BIT, TINYINT, SMALLINT, MEDIUMINT, INT, INTEGER, BIGINT, REAL, DOUBLE, FLOAT, DECIMAL, NUMERIC, DATE, TIME, TIMESTAMP, DATETIME, YEAR, CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, ENUM, SET, or JSON, got ';' in statement: CREATE TABLE pages ( );
I have to modify my ext_tables.sql ? With only the fields that I map in my typoscript ? Is there anything else to add? Any particular syntax?