]
Pete Muir closed JBSEAM-1915.
-----------------------------
Resolution: Won't Fix
This is actually a problem with the default implementation of getCountEjbql
EntityQuery generates exception when reading getResultCount() with
restrictions applied.
----------------------------------------------------------------------------------------
Key: JBSEAM-1915
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1915
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.0.BETA1, 1.2.1.GA
Environment: Windows Xp, SEAM 2.0.0.beta1 CVS sep-10th, JBOSS 4.2.1GA
Reporter: Ricardo Memoria
Assigned To: Pete Muir
Priority: Minor
Fix For: 2.0.0.CR2
The following EntityQuery, when the region is defined (a restriction), I can't read
the getResultCount() due to a bug in the EntityQuery/Query class:
@Name("localities")
public class LocalitiesQuery extends EntityQuery {
private String[] restrictions = {"l.region = #{localities.region}"};
private Region region;
public Region getRegion() {
return region;
}
public void setRegion(Region region) {
this.region = region;
}
@Override
public String getEjbql() {
return "from Locality l join fetch l.region";
}
@Override
public List<String> getRestrictions() {
return Arrays.asList(restrictions);
}
@Override
protected String getCountEjbql() {
return "select count(*) from Locality l";
}
}
It generates an Exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: