SQL syntax failure when collection uses @Where annotation on audit join table.

Description

I have three classes A, B and C; C is derived from B, both classes are mapped to the same table. A has an audited 1:n relation to C with an additional Where-clause; A is audited, C is not. No when I search for an audited version of A and try to access the C's of A, I get an SQL-syntax exception:

A.java

B.java

C.java

Searching for rev. 2 of an A with id 2:

In line three I get an exception:

Thats correct, because the table of class B contains a column "TYPE", but the table for auditing the relation does not. The sql is

Environment

4.3.6, mysql and oracle

Assignee

Chris Cranford

Reporter

Ulrich Kitzinger

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure