[TYPO3-mvc] Same Model Relations result in a sql error
Philipp
philippwrann at gmx.at
Wed Oct 23 15:50:45 CEST 2013
Hey guys
I have a very generic SuperClassModel which gets inherited by a few subclasses
Example:
Model A {
/** @var A */
protected $relation
}
So this model has a relation to a model of the same type.
Now when adding this constraint to my query it generates a join on self but with no alias
that looks like
select * from a left join a on a.relation = a.uid ....
That of course throws a sql error.
How can i do those kind of self-joins? How can i define that property or TCA to avoid this error?
A little more background:
My Basemodel is a located record
It gets extended by a specific event record, a specific harbourer record and a specific location record
in the event record i need a relation to a location record.
More information about the TYPO3-project-typo3v4mvc
mailing list