Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Embeded Object JPQL query not working
Embeded Object JPQL query not working [message #1387591] Wed, 25 June 2014 09:47
Mahendran Mahesh is currently offline Mahendran MaheshFriend
Messages: 1
Registered: June 2014
Junior Member
Hi All,
I am trying to upgrade a project from Hibernate to eclipselink. resolved many issues. Now getting a error while starting the server as below. Kindly let me know if i made any mistakes in my code/JPQL. Thanks for your help..

The JPQL uses embedded object attributes in the query.

Exception Description: Error compiling the query [TempTransactionTransformAuditQuery:
select obj from TempTransactionTransform obj where obj.tempTransactionTsformPK.altIdType= :id and obj.tempTransactionTransformPK.actualValue= :id and obj.tempTransactionTransformPK.altenateValue= :id],
line 1, column 82: unknown state or association field [altIdType] of class [com.test.wm.refdata.model.TempTransactionTransformPK].

JPQL in orm.xml:
select obj from TempTransactionTransform obj where obj.tempTransactionTransformPK.altIdType= :altIdType and obj.tempTransactionTransformPK.actualValue= :actualValue and obj.tempTransactionTransformPK.altenateValue= :altenateValue


public class TempTransactionTransform{

protected TempTransactionTransformPK tempTransactionTransformPK;
protected String fieldName;
private String altIdSubType;
private String transNarration;
protected String amcCode;
private String fieldDescription;
private String altIdSubTypeDesc;

@AttributeOverride(name = "altIdType", column = @Column(name="ALT_ID_TYPE")),
@AttributeOverride(name = "altenateValue", column = @Column(name="ALT_FIELD_VALUE")),
@AttributeOverride(name = "actualValue", column = @Column(name="ACTUAL_FIELD_VALUE"))

public TempTransactionTransformPK getTempTransactionTransformPK() {
return tempTransactionTransformPK;

public void setTempTransactionTransformPK(TempTransactionTransformPK tempTransactionTransformPK) {
this.tempTransactionTransformPK = tempTransactionTransformPK;
public String getFieldName() {
return fieldName;

public void setFieldName(String fieldName) {
this.fieldName = fieldName;
public String getTransNarration() {
return transNarration;

public void setTransNarration(String transNarration) {
this.transNarration = transNarration;
@Column(name = "AMC_CODE")
public String getAmcCode() {
return amcCode;

public void setAmcCode(String amcCode) {
this.amcCode = amcCode;


public class TempTransactionTransformPK{

/** Creates a new instance of TempTransactionTransformPK */
public TempTransactionTransformPK() {
protected String altIdType;
protected String altenateValue;
protected String actualValue;

Previous Topic:Moxy map attribute that doesn't exist in the object model.
Next Topic:EclipseLink 2.3: Clear cache through application
Goto Forum:

Current Time: Sat Oct 21 12:07:29 GMT 2017

Powered by FUDForum. Page generated in 0.02276 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software