I get also this error message.
Used Hibernate version: 3.1.3
Used Database : Oracle 10
Model structure:
Code:
class A {
private int quantity
}
class B extends A {
}
class C extends A {
}
Mapping structure:
Also used "joined-subclass" for the mapping file.
Java Code:
Code:
String sql = "update A set quantity = :newQuanity where oid = :oid";
Query query = session.createQuery(sql);
query.setString("oid", a.getOid());
query.setLong("newQuanity", quanity);
query.executeUpdate();
SQL output:
Hibernate: insert into HT_A select commercial0_.oid as oid from schema.A commercial0_ where oid=?
Hibernate: delete from HT_A
Error:
Caused by: org.hibernate.exception.SQLGrammarException: could not insert/select ids for bulk update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.hql.ast.exec.MultiTableUpdateExecutor.execute(MultiTableUpdateExecutor.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:334)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:209)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1126)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
at ADAO.updateQuantity(ADAO.java:210)
...
Caused by: java.sql.SQLException: ORA-00942: Tabel of view bestaat niet.
Has someone an idea how we can solve this problem?
Thanks in advance!