java - Do Hibernate table classes need to be Serializable? -


i have inherited websphere portal project uses hibernate 3.0 connect sql server database.

there 130 hibernate table classes in project. implement serializable. none of them declare serialversionuid field, eclipse ide shows warning of these classes.

is there actual need these classes implement serializable?
if so, there tool add generated serialversionuid field large number of classes @ once (just make warnings go away) ?

is there actual need these classes implement serializable?

the jpa spec (jsr 220) summarizes pretty (the same applies hibernate):

2.1 requirements on entity class

(...)

if entity instance passed value detached object (e.g., through remote interface), entity class must implement serializable interface.

so, strictly speaking, not requirement unless need detached entities sent on wire tier, migrated cluster node, stored in http session, etc.

if so, there tool add generated serialversionuid field large number of classes @ once

i think batch serial version (ant) tasks.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -