Regarding the use of "?" - as I remember there was such feature in Yii 1.0 where we had aliasToken in CActiveRelation class, so we could use something like "??.name" to refer related table column.
And (I may be wrong) it only worked when you have one relation - in other cases you had to set aliasToken properties for relations manually. So I guess here we can have similar situation - '?' will work only when one related table is involved.

is this correct?

@related will work in queries and scopes ONLY when the model has exactly one relation?

yJeroen
Most probably yes. There will be dirty attributes support so it will be relatively straightforward to save related records. Currently there's no support for it and I'm not sure if it will be in github alpha release.

Now there are some not obvious (at least from the beginning) rules to automatically detect whether relation should be eagerly or lazy loaded:
- one-to-one relation will be eagerly loaded
- one-to-many / many-many relation will be lazy loaded if 'limit' is set (query paginated) or eagerly loaded otherwise
- if we set 'together' option then one-to-many / many-many relation will be eagerly loaded (regardless of 'limit')

In 1.1 I modified the generator so when creating a many-many instead of an if/else check depending on if it was a relation table, I just had it create both and modified the template to add a "//pivot table" comment next to the tables that were relational.

That way I get both many_many tables along with pivot table relations in case of meta data.
It would be nice to have access to both in 2.0.

edit:
Also, occasionally there's a many_many relation where the pivot table would have
> id (PK)
> order_id (FK1, PK)
> item_id (FK2, PK)
And the relation is just through 'order' and 'item', but there's a id as well. Would be nice if while checking if there is a many_many relation it could skip id if there were 3 pk's. But that's probably a fringe case.

If I load a relation using $model->relationName. the magic __get is used to load the relation getRelationName method into _related. However.. What if I want to reload the data?

Isn't a single place to define relations more straight forward? And then use __get and __set to manipulate your related data.

Note that if relations() is scrapped for the idea of seperate methods for each relationship and scope.. I'm thinking of always using two different behaviors for each of my models. One for relations and one for scopes. This way, it's more categorized imho.

If I may ask, what were the pro's and con's to implement it like this?

With this implementation, if I have a model with eg. 5 relations, I need to create a method for each of them. They're also not grouped and since they look the same as other getXxx methods for custom attributes, in a list of all the methods in an IDE it can get unorganized.