Is there an easy way to add new HABTM "connections" ..?

3 messages Options
Embed this post
Permalink
Davit Barbakadze

Is there an easy way to add new HABTM "connections" ..?

Reply Threaded More More options
Print post
Permalink

I've got another problem with that HABTM thingy :( I've got two tables
associated with each other with HABTM. Both of them already having
plenty of records. Let's say I want just to add some more
"connections" to their join table and only them. Is there a way to do
it automagicly?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Davit Barbakadze

Re: Is there an easy way to add new HABTM "connections" ..?

Reply Threaded More More options
Print post
Permalink


Ok, I will explain it differently. Let's say I've got three tables:
posts, tags and posts_tags. posts and tags have a lot of records
already and let's say now I want to add some more associations between
existing posts and tags. What should I do in this case?

On Oct 29, 7:10 pm, jayarjo <[hidden email]> wrote:
> I've got another problem with that HABTM thingy :( I've got two tables
> associated with each other with HABTM. Both of them already having
> plenty of records. Let's say I want just to add some more
> "connections" to their join table and only them. Is there a way to do
> it automagicly?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Davit Barbakadze

Re: Is there an easy way to add new HABTM "connections" ..?

Reply Threaded More More options
Print post
Permalink

In case anyone's having the same problem. This did just what I needed:
http://bakery.cakephp.org/articles/view/add-delete-habtm-behavior

On Oct 29, 7:25 pm, jayarjo <[hidden email]> wrote:

> Ok, I will explain it differently. Let's say I've got three tables:
> posts, tags and posts_tags. posts and tags have a lot of records
> already and let's say now I want to add some more associations between
> existing posts and tags. What should I do in this case?
>
> On Oct 29, 7:10 pm, jayarjo <[hidden email]> wrote:
>
> > I've got another problem with that HABTM thingy :( I've got two tables
> > associated with each other with HABTM. Both of them already having
> > plenty of records. Let's say I want just to add some more
> > "connections" to their join table and only them. Is there a way to do
> > it automagicly?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---