0 Replies Latest reply on Feb 10, 2008 2:54 AM by Hussein Baghdadi

    Schema generated via Hibernate, sequence issue?

    Hussein Baghdadi Novice

      I got my database schema generated for PostgreSQL database via Hibernate annotations.
      The schema generated tables definitions and one sequence definition called: hibernate_sequence
      I wrote a couple of SQL text files to populate the database, I run those files via Apache Ant.

      insert into books values (1, '...', '...', '...');
      insert into books values (2, '...', '...', '...');
      insert into categories values (1, '...', '...', '...');
      insert into categories values (2, '...', '...', '...');

      I start to smell some kind of disaster...
      I shouldn't hard code IDs by hand as I did, I have to use hibernate_sequence to populate all IDs in all tables, right?
      If it is so, any ideas how to do it with my SQL files and Ant?