ensure habtm links are serialized