I am using CakePHP v.2.0 with MySQL.
I have two models, Candidate and Lottery connected with a HABTM relationship.
I want to make a save of this HABTM relation's data in my mysql db, with two restrictions:
1) I am not using a View, that is, i want to construct manually the data array passed as the first parameter in save function - but what's its format?
2) There is no candidates table, as my Candidate model loads data from LDAP (I’ve followed the tutorial at http://bakery.cakephp.org/articles/psychic/2009/03/12/ldap-models-in-cakephp). I just want to save in table lotteries and in the join table, candidates_lotteries.
Any ideas would be much appreciated.