Eric Liu wrote:
i try to use an interface to be persistent.
in hbm.xml :
<class name="man" table="t_person">
name will be ths class name that implements the interface.
can i do that?
no. hibernate cannot guess what implementing class you're using nor can it instantiate your interface. you can use an interface like a normal interface, your hbm just needs to map to a class.
Quote:
and how can i write serialVersionUID? will be useable?
hibernate doesn't serialize anything, nor does it use the serialVersionUID
Quote:
also i want to ask :if i do like this,is some hibernate feature will be lose?
BTW:i use hibernate 3.2.1GA
thanks!!!
no