My blog application has model Comment (db table Comment), and I want to create a module "news" with models Report (db table is NewsReport) and Comment (db table is NewsComment). In the yiic shell i do the following:
(1) model news.models.Report NewsReport
(2) crud news.models.Report
(3) model news.models.Comment NewsComment
(4) crud news.models.Comment
(1)-(2) work fine (model Report and ReportController are successfully created).
Then (3) creates model Comment, (4) creates CommentController, BUT it creates view files basing on the db table Comment (tables Comment and NewsComment have different columns). Moreover, the next command inside the module CommentController's actionCreate creates an instance of application class Comment (not module's):
$model = new Comment;
Should module's models have unique names within the project or I do something wrong or maybe there is any workaround?