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

George Moschovitis george.moschovitis at gmail.com
Mon Aug 21 12:15:18 EDT 2006


This should work, can anyone verify this ?

-g.

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.
>
> -Rayman
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


-- 
http://www.gmosx.com
http://www.nitroproject.org


More information about the Nitro-general mailing list