SQLGrammarException could not fetch initial value for increment generator

In the earlier versions of Hibernate, may be hibernate 2.x, if you use increment generator on a new table then you might get this error. If you really need to use the increment generator on the new table then you need to create a dummy row on that table.
This issue is not present in the current version of hibernate i.e. Hibernate 3.x

One thought on “SQLGrammarException could not fetch initial value for increment generator

Leave a Reply

Your email address will not be published. Required fields are marked *