In my Cakephp application I have define HABTM relation between User Table ( /app/Model/User.php) and Group Table (/app/Model/Group.php ) on 'username'(of User Table) and 'group_id'(of Group Table).
And the relation table is user_groups ( /app/Model/UserGroup.php).
In my application I want to add one raw in UserGroup containing group_id="something" and username=NULL.
As per HABTM defination it's not allow to add raw contain null 'username'. But in CakePHP Documentation there is option for custom insertQuery.
SO how to write this custom insertQuery for some special condition ?