-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.3.0
-
Fix Version/s: None
-
Component/s: jpa
-
Labels:None
-
Environment:tomee+ 1.6.0 stable
I have a query like this
public List<E> qbe(E example)
{ OpenJPACriteriaBuilder cb = (OpenJPACriteriaBuilder) entityManager.getCriteriaBuilder(); CriteriaQuery<E> q = cb.createQuery(clazz); Root<E> entity = q.from(clazz); q.where(cb.qbe(entity, example)); // query by example q.select(entity); TypedQuery<E> tq = entityManager.createQuery(q); return tq.getResultList(); }for entities like this
@Entity
@Table(name="APPUSER",uniqueConstraints=@UniqueConstraint(columnNames=
))
public class User implements Serializable{
/**
*
*/
private static final long serialVersionUID = 4411272750939441365L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
(...)
and this
@Entity
public class PasswordRotationJob implements Serializable{
(...)
@ManyToOne
@JoinColumn(name="userId")
private User submitter;
The QBE query seems to assume a wrong column name
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00904: "T1"."USERID": invalid identifier
[code=904, state=42000]