Hi, thanks for this module, it's very helpful.
I found a bug while creating a view, I needed the view to return the oldest nid for each gallery so I added a relationship but it had no effect.

After inspecting the resulting query I found that the its returning the following:

SELECT node.nid AS nid,
   node_node_gallery_galleries.nid AS node_node_gallery_galleries_nid
..

node_node_gallery_galleries is the name of the first relationship, as you can see it's returning the nid field, however in the relationship definition the name of the field with the max (or min) nid has a different alias:

SELECT gid, MAX(ngi.nid) AS maxnid, node.*

So these relationships aren't producing any effect, I could solve this making the following change:

SELECT gid, MAX(ngi.nid) AS nid 

I'm attaching a patch that fixes this,
Hope you find it useful.

Comments

dddave’s picture