I have some raltions in model
$this->hasManyToMany("id", "ProductMedia", "product_id", "media_id", "Media", "id", [ "alias" => 'media' ]);
$this->hasManyToMany("id", "ProductEvents", "product_id", "event_id", "Event", "id", [ "alias" => "events" ]);
When I try to get $product->media - its ok, but when I get $product->events I got an error
Scanning error before '].id DESC LIMIT ...' when parsing: SELECT [Event].* FROM [Event] INNER JOIN [ProductEvents] ON [ProductEvents].[event_id] = [Event].[id] WHERE [ProductEvents].[product_id] = :APR0: ORDER BY [].id DESC LIMIT :APL0:
Where could the problem be?