hibernate.MappingException while importing solution

Hi,
while importing a solution in an empty repository, I get the following error:

Importing Spotlight.servoy...

[info]	Import contains XML version 10 and repository version 27.
[warning]	Reserved words used as table or column names: columns: version version version version;
[info]	Created table 'spotlight' in server 'spotlight'.
[info]	Added column with name 'geburtsname' to table 'spotlight'.
[...]
[error]	com.servoy.j2db.persistence.RepositoryException: net.sf.hibernate.MappingException: Dialect does not support identity key generation

The exported solution runs on a MS SQL Server with DB Identities.
The database in which I wanted to import the solution is a PostgreSQL database.

Do you have any ideas?

Thank you.

yes in 3.1 we dont support idenities (auto increment sequences/pks) on postgresql, so you have to set before you export it first on a different kind of sequence generation (servoy sequence)

I am not that familiar with Hibernate (yet) and could not find much either but what I did find indicated an issue between the version of Hibernate that was used together with the version of the driver.
Are you using the latest JDBC driver available for PostgreSQL?

Johan, the repository to be imported comes from SQL Server with DBIdentities. We simply want to import this into a PostgreSQL repository. Are you saying we have to go over 250 tables in Servoy and set Servoy sequence, then go over 250 tables in the DB and remove the identity property to be able to import this into PostgreSQL?

I think in the past, Servoy “fell back” to Servoy sequence when we did this. Maybe this is related: Auto enter values / sequence settings - Classic Servoy - Servoy Community

I think we need a way to specify this kind of stuff on import. Imagine you come from Oracle and used named sequences and want to import something like this into Sybase. What would happen there?

Patrick,

You are right, servoy is supposed to fall back to servoy sequence when the database that you import into does not support identity columns.
This problem is related to a bug specific to identity columns in Postgres. Servoy thinks it supports identity columns (hence no fall-back to servoy sequence) but they do not work.

In 3.5 there is already a fix for this (identity columns are working in Postgres)

In 3.1.5 (will be released soon) we have created a fix in which Servoy falls back to servoy sequences for Postgres.

Rob

Thanks.