Hi,
One of the database(Postgres DB) columns has been modified as
ALTER TABLE mobile_send ALTER COLUMN column1 SET DEFAULT nextval('mysequence_seq'::text);
In this table along with this i've 5 more columns.
Now when I'm inserting a row into this table except the column 1 then the sequence is automatically generated for column 1.
Ex : insert into table (col2,col3,col4,col5,col6) values ('a','b','c','d','e') (Value for col 1 will be generated.)
Now if the same thing I try doing with hibernate not using generator for col 1 in hbm mapping file its not generating the sequence automatically.
When hibernate is converted into sql ultimately it turns out to be insert Query just like the one I've shown above in the example.
Also, as the sequence is called at the Database level it should actually create the sequence which is not happening !!!
Can anybody tell me what the problem is ??
Thanks in advance.
|