Ambiguous "id" column when using joins #16

EddM opened this Issue Aug 2, 2011 · 1 comment


None yet

1 participant


When you bring joins into the picture when defining :conditions for models to be added to the sitemap, the primary_column is still assumed to be id. Therefore, when splitting result sets, you're left with a query that looks for models with an (ambiguous) id > 123. Invalid SQL, as you'd expect.

One would assume this could be fixed by passing a custom primary_column of, for example,, but this causes another issue when the gem attempts to call the primary_column method on the objects in question (for example, this would call upon a Post).


My bad, should have just started a pull request instead of an issue.


@EddM EddM closed this Aug 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment