| While it's true, that HANA currently doesn't support inserting a single value into an auto-generated column, it feels to me like throwing a MappingException seems to be too strict. The reason is that Dialect.getNoColumnsInsertString is called while creating the EntityPersister. So now entities mapping to a table with just one auto-generated column block the creation of a session, although the INSERT query may not even be executed. You can check this behavior, for example, by running org.hibernate.jpa.test.ops.GetLoadTest. I would prefer not throwing a MappingException and having the user run into a SQL query exception instead, because it doesn't unnecessarily block the creation of sessions. |