The question that I may be asking may be a rather trivial one, but still request someone to explain me the differnce between the following codes:
<id name="Key" column="Date_Interval_Key" type="long" >
<generator class="sequence" >
<param name="sequence">SEQ_DATE_INTERVAL</param>
</generator>
</id>
and a similar code but where we do not use the param tags. What I cannot seem to understand is that what does SEQ_DATE_INTERVAL refer to? Searching on the internet I found out that:
If any parameters are required to
configure or initialize the generator
instance, they are passed using the
param element.
But can someone explain me that where is this SEQ_DATE_INTERVAL (or its value) passed from within my code? Is this useful or can I continue without using the tag?
The
paramis instructing NHibernate to utilize a (probably) Oracle Sequence to get theIdvalue of the entity. If you don’t specify aparam, NHibernate will use a generic one for it, namedHibernate_Sequence.