views:

68

answers:

2

I have an entity that has many-to-many association to itself.

If I needed some additional properties (like asked here) the answer would be to use a new intermediate entity. But without them is it bad practice to use direct many-to-many association to the entity itself?

A: 

Using a mapping table is the optimal way for N to N relations without creating new columns in the mapped tables themselve.

Steav
Maybe my question was not very clear. As I've seen in this answer http://stackoverflow.com/questions/1831186/many-to-many-on-the-same-table-with-additional-columns/1833365#1833365, many-to-many relationships on the same table are "a nightmare to maintain". So I wanted to know if I actually don't need another entity should I still avoid them.
Aleksey Otrubennikov
A: 

Aleksey,

If you have additional columns, you need a new intermediate Entity.

But without them is it bad practice to use direct many-to-many association to the entity itself ?

No, you can if you want since you do not have additional columns on The joined Table

Arthur Ronald F D Garcia
@Aleksey Otrubennikov When i say *many-to-many relationships on the same table are a nightmare to maintain* is because him or her **would like To put all data on a single Table** (No joined Table), Nothing else
Arthur Ronald F D Garcia