I am Newbie to Hibernate.I have a table with primary key as autogenerate column. I have given my mapping hbm file below
<hibernate-mapping> <class name="sample.test" table="TEST" > <id name="id" column="id" type="long" > <generator class="sequence" > <param name="sequence" >seq_test</param> </generator> </id> .... .....
</hibernate-mapping>
My class contains:-
private long id;
public long getId() { return id; }
public void setId(long id) { this.id = id; }
However, this doesn't work properly for an oracle database unless you add allocationSize=1 to @SequenceGenerator. Does anyone how to do this? I can't find any documentation, which defines how to add another parameter for allocationSize (<param name="?">1</param>) in <hibernate-mapping>?
Can anyone please tell me the use of "allocationSize". I can't find any documentation for this.
|