This is a my #1 most hated rails bug. The framework should not make
you choose between good db design and simple code. Further this is as
about as far from the principle of least surprise as you can get.
The workaround is to add :select => 'table.*' to your habtm declaration.
Also FWIW, I highly recommend you always add primary keys to all your
tables. This will make it much easier (as opposed to horribly
painful) later when they do (and they often do) become first class
model objects and costs you basically nothing.