Re: Nested items with HABTM

2008-01-07 Thread Seb
Just to clarify, what i'd done (with both just pointing to Article) didn't work and borked out with an error "non-unique key Article" or something similar... Seb On Jan 7, 1:28 pm, Seb <[EMAIL PROTECTED]> wrote: > This is interesting - I'd previously tried without using the HABTM > part: > > cla

Re: Nested items with HABTM

2008-01-07 Thread Seb
This is interesting - I'd previously tried without using the HABTM part: class Article extends AppModel { var $name="Article"; var $hasMany=array("Article"); var $belongsTo=array("Article"); } and let Cake deal with the automatic matching of Article names to ids etc - you've created differ

Re: Nested items with HABTM

2008-01-07 Thread grigri
If your structure is really tree-like, then a HABTM relationship is not really useful. The main question to an answer is "can one article have several parents?". As in direct parents, not hierarchy. If it can, then your structure is not a tree, and HABTM should be used, and you'll have to create a

Nested items with HABTM

2008-01-07 Thread Seb
Hello! I'm only just starting on the cakephp business, and so far, i'm impressed - i've run through most of the tutorials i could find on the web relating to cake, and the IBM ones too so got a fairly good understanding of what's going on... I've hit a wall though - in the thing I'm writing at t