Specify the table type/storage engine in Doctrine 2

Matt Crinklaw-Vogt picture Matt Crinklaw-Vogt · Sep 23, 2011 · Viewed 9.2k times · Source

So how can one specify the storage engine to use for a given entity in Doctrine 2?

I'm creating a table that needs a full text index and only the MyISAM storage engine supports full text indexing in MySQL.

As a side: it looks like Doctrine 2 doesn't support full text indexing out of the box? Nor full text searches? Is that correct?

Answer

Gabriel ThaKid picture Gabriel ThaKid · Jul 21, 2014

I'm two years too late, but knowing this is important since it isn't documented for some reason, we have been struggling to achieve this but this is the solution

/**
 * ReportData
 *
 * @ORM\Table(name="reports_report_data",options={"engine":"MyISAM"})
 * @ORM\Entity(repositoryClass="Jac\ReportGeneratorBundle\Entity\ReportDataRepository")
 */
class ReportData
{