at the moment i'm creating an application that uses two databases and it would be lovely if i could pass the db connection yiic should use (for Model, CRUD,…) as a parameter instead of changing the main.php.
And if this would generate a model with an overridden getDbConnection() function so i don’t have to c&p it all the time this would also be wonderful!
Maybe an idea?
It would be better you customize the crud command. There are simply too many ways that you can define and use DB connections. The included yiic command mainly works for the most common scenario.
I see - this applies to my second suggestion, but is it really so unusual that you want to use another db connection (which you have defined in main.php) than 'db' for the model generation?!