Is it possible to define a Primary Key as BLOB?
I've defined a table in MySql with the following syntax:
CREATE TABLE producer (
producerKey BLOB NOT NULL
, data BLOB
, PRIMARY KEY (producerKey(255))
where producerKey and data are meant for storage of Java Objects, but once I insert one row every other insert command throws a SQLException saying that the field producerKey cannot have the same value. But I'm pretty sure that I'm using different Java Objects in the various insert commands.
Can anyone give me a hint on how to define a Java Object as a Primary Key?
Thanks in advance!