Handle HABTM versioned records
Removed legacy id_with_version method