[Nitro] og: automatic deletion of records in M:N relations?

Stephan Mueller d454d at web.de
Mon Aug 21 14:52:39 EDT 2006


* George Moschovitis <george.moschovitis at gmail.com> [21.08.2006]:

> This should work, can anyone verify this ?

I will try it. Please give me one or two days... ;)

Cheers,

Steph.


> On 8/21/06, Riku Räisänen <riku.raisanen at walkingwoods.com> wrote:
> > Try to set the relation only to other of the classes (it's two-way
> > automatically).
> >
> > Also, try this:
> >
> > class Item
> >     # ...
> >     joins_many Tag
> >     # ...
> > end
> >
> > class Tag
> >     # ...
> >     belongs_to Item
> >     # ...
> > end
> >
> > so Tags get deleted if the Item is deleted, I don't know why you would
> > want to remove the Items if a Tag is removed...
> >
> > can't test these out, in a hurry.


More information about the Nitro-general mailing list