Hello Everyone,
Well Last Night i was facing a very common problem of saving a HAS_MANY and MANY_MANY relation in Into the database.But after looking at serval forum post and documentation I come up with the point is that There is no such a better way to saving a HAS_MANY and MANY_MANY relation Active record into the Yii.
I know very well process of Collecting a tabular input to save has many relation.But this one is not a perfect OOP approach to resolve this problem.
I have checked Lots of Forum Post which are suggesting to use some kind of contributed Behavior Extensions.But its not a good thing to Depended on any contributed extension for this most usable and common task in Web environment.
Since, i have spend my lots of time with CakePHP also.Which is a good competitor against Yii.And CakePHP provide a perfect solution to perform a CRUD operation on Relational Active record.Defining a HAS_MANY relation in model class in Table A which have a has many relation with Table B and Calling a Save method on Model A save this relation work like a charm in CakePHP and also work perfectly on Updating and Deleting a Active record.
But I love Yii and It is my first choice to any kind of porject in it That is why i expecting this common feature should be included in Yii upcoming version to make it more Strong.
If by any chance there is a perfect solution available here in Yii.Then please clear my doubts Coz still i am in learning phase so might be i have done any mistake to understand this concept with Yii
Or Any body want to look what i am expecting which is already available in Cakephp then you can check it on This link.
But one thing i can assure you.If this kind of perfect solution will available Yii then Its going to be very easy for the users who are extensively using this framework.
So, I an requesting to the Yii Dev Staff to think about this Feature and expecting that it would be included in Upcoming version of Yii very soon.
Thanks to Yii Dev staff for making this powerfull framework.
Thanks to everyone here.