Use the ordinal value rather than trying to store an object in the database.