Hibernate Core: 3.2.2.ga
Hibernate Annotations: 3.3.0.GA
Hibernate EntityManager: 3.3.1.GA
We have a single class per hierarchy mapping with a super class and more than 10 sub-classes, some of the sub-classes map the same column on database, when executing a select query on the super-class the aliases created for the column is the same, so by applying pagination on oracle "column ambiguously defined" occurs.
Code:
@Entity
class A{
}
@Entity
class B extends A {
@Column(name = "a")
private String a;
...
}
@Entity
class C extends A {
@Column(name = "a")
private String b;
...
}
class D extends A {
// no mapping of column "a"
}
now querying on the A creates a query with duplication alias.
What shall I do? Is it a but and must be reported in Hibernate Jira?