[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1915) EntityQuery generates exception when reading getResultCount() with restrictions applied.

Ricardo Memoria (JIRA) jira-events at lists.jboss.org
Tue Sep 11 18:16:10 EDT 2007


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


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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list