I’m trying to insert some new objects into a firebird database using NHibernate.
I get the error ‘could not get next sequence value[SQL: SQL not available]’
Here is the mapping I’m using at present. Note ANML_EVNT is the name of the generator I want to use.
<id name='Id' column='ID' type='integer'> <generator class='sequence'> <param name='sequence'>ANML_EVNT></param> </generator> </id>
If you still are looking for an answer here is how I’ve used it successfully.
I use the ‘native’ generator because when adding support for SQL Server to our program the only thing in NHibernate I had to change was the generator types to ‘native’ because Firebird and SQL Server implement their ‘auto incrementing identity’ columns differently. In Firebird it used the named generator and in SQL Server it ignores the ‘sequence’ parameter and uses the auto-increment built in.
Here’s the example of what I’m talking about:
With all that said, as gcores answered, all that appears to be wrong with your config is the extra ‘>’ after ANML_EVNT.