[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-2100) Allow same parameter more than once in a single restriction

Diego Ballve (JIRA) jira-events at lists.jboss.org
Sat Oct 13 15:15:14 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-2100?page=comments#action_12382307 ] 
            
Diego Ballve commented on JBSEAM-2100:
--------------------------------------

I have not used components.xml for it but I think it would be something like this:

    <fwk:entity-query name="contracts">
        <fwk:ejbql>from Contract</fwk:ejbql>
        <fwk:restrictions>
            <value>contract.sellerId = #{currentUser.id} or contract.buyerId = #{currentUser.id}</value>
        </fwk:restrictions>
    </fwk:entity-query>

Current implementation would give you error message ('max 1 vb per restriction' or something like that). My point was that if vb repeats, it can be counted as 1 vb and restriction is still acceptable.

> Allow same parameter more than once in a single restriction
> -----------------------------------------------------------
>
>                 Key: JBSEAM-2100
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2100
>             Project: JBoss Seam
>          Issue Type: Patch
>          Components: Framework
>    Affects Versions: 2.0.0.CR2
>            Reporter: Diego Ballve
>            Priority: Minor
>         Attachments: QueryParser.diff
>
>
> Sometimes you need to compare a restriction parameter w/ many fields in the same restriction. In those cases, I feel that it makes more sense to have multiple comparisons than to write something like :param IN (select1, select2, ...).
> The attached patch allows that, registering the same value binding once per restriction but allowing it to appear multiple times.

-- 
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