[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1915) EntityQuery generates exception when reading getResultCount() with restrictions applied.
Ricardo Memoria (JIRA)
jira-events at lists.jboss.org
Thu Sep 27 14:54:40 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1915?page=comments#action_12379174 ]
Ricardo Memoria commented on JBSEAM-1915:
-----------------------------------------
Hi Pete,
I made myself changes in the SEAM source code that fix it.
Is there a problem with the solution I posted in the forum?
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=118365
> 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: 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