Hi,
I´m using Hibernate 2.1.4 with Oracle 9.
I´m trying to use Interval data type, and I create a TO com String
data type attribute to represents the interval, like this:
Code:
Class:
public class OsTO implements Serializable
{
private Long id;
private Calendar nextExecutionDate;
private String executionDsFrequency;
private String executionYmFrequency;
.
.
.
}
Mapping file:
<hibernate-mapping>
<class name="ta.j2ee.sitename.model.to.OsTO" table="os_test">
<id name="id" column="os_id">
<generator class="assigned"/>
</id>
<property name="nextExecutionDate" column="NEXT_EXECUTION_DT"/>
<property name="executionDsFrequency" column="EXECUTION_DS_FREQ"/>
<property name="executionYmFrequency" column="EXECUTION_YM_FREQ"/>
</class>
</hibernate-mapping>
The table is like this:
Code:
Nome Nulo? Tipo
----------------------------------------- -------- ----------------------------
OS_ID NUMBER(10)
NEXT_EXECUTION_DT DATE
EXECUTION_DS_FREQ INTERVAL DAY(2) TO SECOND(6)
EXECUTION_YM_FREQ INTERVAL YEAR(2) TO MONTH
What do I must to do to mapping Intervals?
thanx!!!!