HABTM with short length keys

CakePHP v 2.9.1. I have two tables that are joined with a HABTM relationship. The id field of one table is CHAR(1), the other is CHAR(3). This is quite acceptable, I believe. Saving HABTM data is failing because line 2040 of Model.php checks: if string and length = 36 or 16 - then save, else don’t save. By the time it’s got here any existing HABTM relationships have been deleted. Interested to know why this restriction is there, and more importantly how I can work around this (without remodelling my data structure or creating a through model).