Ok, I have run into a big problem… Im sorry to ask for help again but Im very stuck…
I am using DMZ cause I didnt want to create new tables for each relation.
I have Event, Type, Client
Event has one Type and one Client
Type has many Events
Client has many Events
...
my events table has id, client_id and type_id… after a form I call this method… which always throws me an error that says I should call set method when updating… but Im creating a bran new Event…
function send_event()
{
$e = new Event();
$c = new Client();
$t = new Type();
$c->where('id','1')->get();
$t->where('id','1')->get();
$e->save(array($t,$c));
}Just in case you are wondering, those queries do produce wanted results.. its just the “$e->save(array($t,$c));” that appears to fail for me… my form is done through ajax but I doubt that has anything to do with it .
Also, my tables are InnoDB and have foreign keys.