Angel Taveras wrote:
I believe that it's a requirement that the Primary Keys of any entity must be serializable.
regards,
yes thats exactly what i meant by its enough for the UserId which is the primary key ;), actually if you look at the load or get methods of the session object of hibernate you will notice that the second parameter that is the primary key should be serializable.
however its not bad to always make your classes serializable if you can, since many frameworks depends on that to move objects back and forth on the network in distributed applications ;)
(peace)