Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-22 Thread eleven10
Hi Jon, I really appreciate your help. Thanks to you, I hope my cake will turn out good :). > that wasn't really my point, from your model setup something struck me > as odd, though looking at it now I can't see it, so perhaps it's fine! Generally gut reactions are true, so if you ever recall w

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-22 Thread eleven10
Hi, > Ok, first thing is I think it might be a good idea to not have > duplicate association names, you Currently have > > Bid belongsTo User,BidSession > BidSession hasMany Bid > BidSession hasAndBelongsToMany User > User hasMany Bid > User hasAndBelongsToMany BidSession > > I really think you'd

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-21 Thread eleven10
.. but why shouldn't $this->User- > >>BidSessionRegistration->find('list') work? That is more intuitive ... > > and that is why I wonder where I am making a mistake! > > I'm really struggling to follow your code in gmail, could you post > your models, con

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-20 Thread eleven10
Hi Jon, > Nope, your can not use composite keys with cakephp, you have to have > an ID (or a field that you use as the primary, auto-incrementing id) - > search the group for more background on this. I was under the impression that habtm join tables don't need to have a separate 'id' PK if you'r

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-20 Thread eleven10
I tried your suggestion, no changes ... However, var $hasMany = 'Bid' also works ... as the output from pr($this->User->hasMany) in UsersController shows: Array ( [Bid] => Array ( [className] => Bid [foreignKey] => user_id [conditions] =>

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-20 Thread eleven10
l, Model::find() does have the signature find($conditions = null, $fields = array(), $order = null, $recursive = null) :)]. Anyway ... but why doesn't $this->User->BidSessionRegistration- >find('list') work?! On Aug 20, 9:46 am, eleven10 <[EMAIL PROTECTED]> wrote: > Go

Re: HABTM woes (cake_1.2.0.7296-rc2)

2008-08-19 Thread eleven10
Good observation! I had somehow missed the missing backtick ... another thing for which I don't understand ... I know it _has_ to be something subtle, but I just can't get my finger on it ... Anyway, here are the model classes (I have just removed some of the option keys from the auto-generated st

HABTM woes (cake_1.2.0.7296-rc2)

2008-08-19 Thread eleven10
Hi, I am trying to improve my university's course bidding system using CakePHP (and learning it in the process). As a prototype, I have the following data model: * users [id, login, name, points] * bid_sessions [id, title, cap, starts_at, ends_at] * bid_session_registrations [bid_session_id, use