On 10/10/13 01:19 +0200, Cédric Krier wrote:
> > >     - I will add a start_date and end_date on party.relation with an
> > >       active Function field that deactivate the relation if current is
> > >       out of the limit.
> > 
> > Nice idea.
> > 
> > >     - I'm wondering if party.relation.type should not simply have an
> > >       option link to the reverse party.relation.type
> > 
> > I prefer the current design because it is easier to configure.
> 
> I don't like it because it rely on context and give a sens to the
> relation. But the sens of the relation is already defined in
> party.relation with the from-to

There is just a small issue with this design it is that it duplicates
the link between types. But I think it is not a big deal because it is
just configuration part and I think there is no solution in relational
world for this.

After some talk with Bertrand, he was proposing to not use a query for
the relation table but to really create the reverse relation.
This design as some advantage:

    - simple concept
    - could enforce unique constraint (but I don't think such constraint
      will be good)

But it has also some disavantage:

    - more work at creation
    - could have creation conflict
    - make reverse relation static (with other design if the reverse
      relation type is changed, it applied on all relation
      out-of-the-box)
    - will require synchronisation between start/end date (or any other
      attributes)

So I still think the reverse query table is a better choice.
If we agree I will update the wiki according.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgp0z1gDG625D.pgp
Description: PGP signature

Reply via email to