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

Norman Richards (JIRA) jira-events at lists.jboss.org
Sun Sep 16 17:21:11 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1915?page=all ]

Norman Richards updated JBSEAM-1915:
------------------------------------

    Fix Version/s: 2.0.0.GA

> 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
>             Fix For: 2.0.0.GA
>
>
> 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