Ran into this issue when attempting to log state changes on a model that uses Postgres uuid4 fields for the primary key.