[FLOW3-general] Annotation syntax for table indexes
Regine Rosewich
regine.rosewich at hoellenberg.biz
Mon Jan 9 02:36:20 CET 2012
Hi thomas,
the correct syntax is:
1. for unique constraints
@ORM\Table(uniqueConstraints={ORM\UniqueConstraint(name="<uniqeConstraintNam
e>",columns={"<col1>","<col2>","<col..n>"})})
2. for indexes
@ORM\Table(indexes={ORM\index(name="<indexName>",columns={"<col1>","<col2>",
"<col..n>"})})
3. Combination of both
@ORM\Table(uniqueConstraints={ORM\UniqueConstraint(name="<uniqeConstraintNam
e>",columns={"<col1>","<col2>","<col..n>"})},
indexes={ORM\index(name="<indexName>",columns={"<col1>","<col2>","<col..n>"}
)})
Hope it helps
Regine
> -----Ursprüngliche Nachricht-----
> Von: flow3-general-bounces at lists.typo3.org [mailto:flow3-general-
> bounces at lists.typo3.org] Im Auftrag von Thomas Rödiger
> Gesendet: Sonntag, 8. Januar 2012 15:07
> An: flow3-general at lists.typo3.org
> Betreff: [FLOW3-general] Annotation syntax for table indexes
>
> Hi,
> one more question. i want dontrine to create an index for of of my
> colums. I found out by looking at the flow3Annotation driver, that i
> can
> use something like
> * @ORM\Table(indexes=(field1,field2))
> in the annotation of my class-definition. But, just something like
> this.
> I could not find the correct syntax. is there someone who can help me?
>
> thanks,
> thomas
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list