Michiel Meeuwissen wrote:
Ernst Bunders wrote:

André van Toly wrote:

Op 12-mei-2006, om 11:35 heeft Nico Klasens het volgende geschreven:


This is exactly the point in which MMbase and Hibernate made different design choices. The hibernate guys will tell you never to use many-to-many relations anywhere. There is always a better alternative. MMbase uses many-to-many relations everywhere. But they both solve the persisitency problem


Is it not true that it is your own choice to use many-to-many relations while building MMBase applications? You can avoid them and (maybe, we don't know because there are no tools to measure) build a fast performing application.

I think the point is that mmbase is allways using a join table (ei the relation) to join twoo nodes. That is not good for performance. Wat is really bad is if the same join table is used to join say 5 or 6 steps in one query. mmbase knows no other way. Specially when you combine this with crappy database inheritance, the insrel table becomes a problem..


I'd propose the relative small change in query syntax, that you can also
follow node-fields in a 'path' on the cloud. For those kind of relations you
can skip the intermediate insrel then, simplifying the database query.

An MMBase relation object is then a special kind of normal object with 2
node fields, and recognized by query-objects and syntax.

<mm:list path="news;author,people"> or so which would lead to

select .. from news n, people p where n.author = p.number;

in stead of <mm:list path="news,author,people"> which would lead to

select .. from news n, insrel i, people p where n.number = i.snumber and
i.dnumber = people.p.number and i.rnumber = ..;



shouldn't it be more logical to have something like:

<mm:listnodes type="news" id="n">
        <mm:node node="n:author">
                <!-- do stuff -->
        </mm:node>
</mm:listnodes>

Your syntax seems to suggest that you can access the author without using the news, which is a bit odd, becouse the author is only relevant (ie an author) in respect to this news node.

Ernst



Michiel


_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to