openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pieter Pareit <pieter.par...@easypay.be>
Subject Error in LEFT JOIN FETCH xxxx as
Date Thu, 27 Aug 2009 06:59:23 GMT

Hi,

I'm testing openJPA-2.0.0.SNAPSHOT.
I have an error in my JPQL.

List<CompanyEffDate> rows = em.createQuery("SELECT c FROM CompanyEffDate as
c LEFT OUTER JOIN FETCH c.companyAddresses as ca").getResultList();

<openjpa-2.0.0-EA2-SNAPSHOT-r422266:781480 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: "Encountered "as" at
character 76, but expected: [",", ".", "GROUP", "HAVING", "INNER", "JOIN",
"LEFT", "ORDER", "WHERE", <EOF>]." while parsing JPQL "SELECT c FROM
CompanyEffDate as c LEFT OUTER JOIN FETCH c.companyAddresses as ca". See
nested stack trace for original parse error.

When I remove the "as ca" the query works fine.
For me this this seems like an error in JPQL?

Attention!
There Foreignkey companyAddresses is mapped by a non-standard join.

@OneToMany
@ElementJoinColumn(name="companyId", referencedColumnName="id")
private List<CompanyAddressEffDate> companyAddresses;

public List<CompanyAddressEffDate> getCompanyAddresses() {
	return companyAddresses;
}

public void setCompanyAddresses(List<CompanyAddressEffDate>
companyAddresses) {
	this.companyAddresses = companyAddresses;
}

Regards,
Pieter Pareit
http://www.easypay-group.com


-- 
View this message in context: http://n2.nabble.com/Error-in-LEFT-JOIN-FETCH-xxxx-as-tp3521812p3521812.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message