1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/Object relational mapping - Indexes - Special indexes.php
legenerationlazi 13840516a9 removed empty php tags at the top of some pages
html->wiki conversion previously missed
2007-04-19 20:41:19 +00:00

21 lines
500 B
PHP

Doctrine supports many special indexes. These include Mysql FULLTEXT and Pgsql GiST indexes.
In the following example we define a Mysql FULLTEXT index for the field 'content'.
<?php
renderCode("<?php
class Article
{
public function setTableDefinition()
{
\$this->hasColumn('name', 'string');
\$this->hasColumn('content', 'string');
\$this->index('content', array('fields' => 'content',
'type' => 'fulltext'));
}
}
?>");