Hi all!!!
I'm a beginner with hibernate, and I have a little problem, so I was wondering if anyone could help me...
The problem is that I need to asign a default value of 0 to a property, but I don't know how. I know that I can assign it to an <id> by using the unsaved-value poperty... but how can I make solve this with a property or column?
My mapping is somtthing like this:
<class name="Language"> <id name="code" type="long" column="code" unsaved-value="null"> <generator class="native"/> </id> <property name="ord" type="long"/> <property name="name" type="string" length="40"/> <property name="ident" type="string" length="40"/> <property name="isoName" type="string" length="20"/> </class>
ANd what I need is to have a dafault value of 0 in property "ord"...
Can anyone help me please?
Thanks in advance for any response!!!
|