List Info

Thread: HABTM Recursive on itself?




HABTM Recursive on itself?
user name
2008-02-24 07:23:47
I am doing a find on a Tag model.. and this finds all the
articles on
the Article model, but is there a way to retrieve the
articles with
the related tags inside the article array? Setting the
recursive
higher does not work? :(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Cake PHP" group.
To post to this group, send email to cake-phpgooglegroups.com
To unsubscribe from this group, send email to
cake-php-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: HABTM Recursive on itself?
user name
2008-02-24 09:20:18
Ah to bad :p i guess i will have to write queries again hehe


On Feb 24, 2:52 pm, Marcos Hernández <kchopein.lis...gmail.com>
wrote:
> Hi!!
> Y have the same problem here. I works fine if you don't
set any conditions, but there's no way if you try to filter
(WHERE). The best solution I've found googling was to change
the relationship from HABTM to a HasMany/BelongsTo
combination. Well, I don't know what you think but for me is
a disappoiting one, so I decided to solve it with a custom
SQL query.
> Sorry mate, Cake is not perfect!!
> Best regards!!
> Mech7 escribió:I am doing a find on a Tag model.. and
this finds all the articles on the Article model, but is
there a way to retrieve the articles with the related tags
inside the article array? Setting the recursive higher does
not work? :(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Cake PHP" group.
To post to this group, send email to cake-phpgooglegroups.com
To unsubscribe from this group, send email to
cake-php-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: HABTM Recursive on itself?
user name
2008-02-24 07:52:44
Hi!!

Y have the same problem here. I works fine if you don't set any conditions, but there's no way if you try to filter (WHERE). The best solution I've found googling was to change the relationship from HABTM to a HasMany/BelongsTo combination. Well, I don't know what you think but for me is a disappoiting one, so I decided to solve it with a custom SQL query.

Sorry mate, Cake is not perfect!!

Best regards!!

Mech7 escribi&oacute;:
f47g2000hsd.googlegroups.com" type="cite">
I am doing a find on a Tag model.. and this finds all the articles on
the Article model, but is there a way to retrieve the articles with
the related tags inside the article array? Setting the recursive

higher does not work? :(


  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-phpgooglegroups.com
To unsubscribe from this group, send email to cake-php-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )