Re: HABTM save Question

2012-09-10 Thread gloop
Hi, sorry for my late response. I tested some ways and now i can save/edit. public function edit($id = null){ if(empty($id)) $this->redirect('index'); if(!$this->request->is('get')){ $data = $this->request->data; $this->Translation->save($data['Translation']); $_data =

Re: HABTM save Question

2012-09-06 Thread Mohammad Naghavi
Hi Steffen, what is wrong with $this->Translation->LanguagesTranslation->save() that you need a better way? On Thu, Sep 6, 2012 at 3:25 PM, gloop wrote: > Hello, > > is there a way to save directly to the joining table? Like the find data? > > Model Translation HABTM Translation: > > $data

HABTM save Question

2012-09-06 Thread gloop
Hello, is there a way to save directly to the joining table? Like the find data? Model Translation HABTM Translation: $data = array( 'Translation' => array( 'key' => '213152374' ), 'Language' => array( array( 'id' => '1',

Re: Yet Another HABTM Save Question

2009-01-21 Thread Rob Wilkerson
On Jan 20, 7:47 pm, Rob Wilkerson wrote: > On Tue, Jan 20, 2009 at 7:40 PM, brian wrote: > > > Yeah, that's the bit that has me confused, also. Even before seeing > > your comment, I was wondering why it would set the value, then create > > another UUID. I don't get it. > > Color me stuck, too.

Re: Yet Another HABTM Save Question

2009-01-20 Thread Rob Wilkerson
On Tue, Jan 20, 2009 at 7:40 PM, brian wrote: > > Yeah, that's the bit that has me confused, also. Even before seeing > your comment, I was wondering why it would set the value, then create > another UUID. I don't get it. Color me stuck, too. I tried the IRC channel, but no one there was able to

Re: Yet Another HABTM Save Question

2009-01-20 Thread brian
Yeah, that's the bit that has me confused, also. Even before seeing your comment, I was wondering why it would set the value, then create another UUID. I don't get it. On Tue, Jan 20, 2009 at 6:25 PM, Rob Wilkerson wrote: > > On Tue, Jan 20, 2009 at 1:42 PM, brian wrote: >> I confess that I'm r

Re: Yet Another HABTM Save Question

2009-01-20 Thread Rob Wilkerson
On Tue, Jan 20, 2009 at 1:42 PM, brian wrote: > I confess that I'm really not at all clear about what Cake is doing > here. That doesn't make sense to me. It appears to be deliberately > including the UUID twice. Yes and no. I've done a little more digging and the method is taking two parameters

Re: Yet Another HABTM Save Question

2009-01-20 Thread brian
I've been thinking about switching to UUIDs myself and so did a little digging. If you look at the source for Model::__saveMulti() you'll see what's happening: 01287 if ((is_string($row) && (strlen($row) == 36 || strlen($row) == 16)) || is_numeric($row)) { 01288

Re: Yet Another HABTM Save Question

2009-01-20 Thread Rob Wilkerson
On Mon, Jan 19, 2009 at 10:23 PM, brian wrote: > What does the output look like when you have this: > > if (!empty($this->data)) > { > die(debug($this->data)); Here's the output: Array ( [Event] => Array ( [name] => My Linked Event [start_time_date] => 2009

Re: Yet Another HABTM Save Question

2009-01-19 Thread brian
What does the output look like when you have this: if (!empty($this->data)) { die(debug($this->data)); On Mon, Jan 19, 2009 at 7:05 PM, Rob Wilkerson wrote: > > Hey all - > > I see a lot of questions about this, but nothing I've found references > the error I'm seeing so I thought I'd post h

Yet Another HABTM Save Question

2009-01-19 Thread Rob Wilkerson
Hey all - I see a lot of questions about this, but nothing I've found references the error I'm seeing so I thought I'd post here and see whether anyone else recognizes what I'm doing wrong. I have an Event model that habtm Attraction: class Event extends AppModel { public $name