[TYPO3-mvc] Annotaion based relation-type-detection

Martin Kutschker masi-no at spam-typo3.org
Fri Apr 16 11:17:16 CEST 2010


Felix Oertel schrieb:
> Hey ho,
> 
> we all know, we had ... erm, let's say: "issues" with IRRE. ;-) The hole
> system is not meant to be a good way to detect a databse-relation-type.
> 
> As we use annotations anyway, we should act consistently and detect the
> database's relation-type by using an annotation.
> 
> This patch will introduce three new annotations:
> @OneToOne
> @OneToMany and
> @ManyToMany

How about using just a single annotation @relation with a parameter?

And I have a porblem with the oneToOne annotation. In your patch it is also used in the models that
are on the "one" part of a oneToMany relation. eg "post" will belong to one blog, but a blog will
have many post.

> PS: As discussed with Jochen we want to replace (!) TCA detection with
> annotation based detection, so TCA-config is not used at all and you
> HAVE TO use the annotations.

Hm, I don't see this as advantage as you have two configure stuff twice. I' prefer if annotations
are only necessary if the TCA isn't expressive enough.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list