CMP queries - Weblogic

This is a discussion on CMP queries - Weblogic ; How would you go about implementing the following in CMP 1, Outer Joins, 2, IN, as in SELECT * FROM ACCOUNT WHERE ACCOUNT_ID (IN 1,2,3,4) etc 3, Is there any way to control the number of rows returned?...

+ Reply to Thread
Results 1 to 4 of 4

Thread: CMP queries

  1. CMP queries


    How would you go about implementing the following in CMP

    1, Outer Joins,
    2, IN, as in SELECT * FROM ACCOUNT WHERE ACCOUNT_ID (IN 1,2,3,4) etc
    3, Is there any way to control the number of rows returned?



  2. Re: CMP queries


    "Aaron" wrote in message
    news:3f576835$1@newsgroups.bea.com...
    >
    > How would you go about implementing the following in CMP
    >
    > 1, Outer Joins,


    I think you are pretty much out of luck. You do have option to check for
    null using IS NULL

    > 2, IN, as in SELECT * FROM ACCOUNT WHERE ACCOUNT_ID (IN 1,2,3,4) etc


    This is supported like:
    Example: SELECT o.iD, o.status FROM Order o WHERE o.status IN
    ('ACTIVE','CLOSED')

    Is equivalent to:

    Example: SELECT o.iD, o.status FROM Order o WHERE o.status = 'ACTIVE' OR
    o.status = 'CLOSED'


    > 3, Is there any way to control the number of rows returned?
    >
    >


    If you are using finders then there is element called maxelements. Check
    out the dtd:
    http://www.bea.com/servers/wls700/dt...stence-700.dtd

    If you are using dynamic query, there is also a way to set max rows...



  3. Re: CMP queries

    Relationship caching is implemented using Outer Joins so I suggest you just make
    them into multiple entities and then specifying that the relations are cached
    (prefetched).

    Sam

    Aaron wrote:
    > How would you go about implementing the following in CMP
    >
    > 1, Outer Joins,
    > 2, IN, as in SELECT * FROM ACCOUNT WHERE ACCOUNT_ID (IN 1,2,3,4) etc
    > 3, Is there any way to control the number of rows returned?
    >
    >



  4. Re: CMP queries

    The intent of my message was to show that you wouldn't need to do them
    explicitly. They would be done when you queried for the parent object. If you
    want to send me a specific example I may be able to elaborate further.

    Sam

    Lenny wrote:

    > But, how do get the outer join in the query?
    >
    > "Sam Pullara" wrote in message
    > news:3f5d29ad@newsgroups.bea.com...
    >
    >>Relationship caching is implemented using Outer Joins so I suggest you

    >
    > just make
    >
    >>them into multiple entities and then specifying that the relations are

    >
    > cached
    >
    >>(prefetched).
    >>
    >>Sam
    >>
    >>Aaron wrote:
    >>
    >>>How would you go about implementing the following in CMP
    >>>
    >>>1, Outer Joins,
    >>>2, IN, as in SELECT * FROM ACCOUNT WHERE ACCOUNT_ID (IN 1,2,3,4) etc
    >>>3, Is there any way to control the number of rows returned?
    >>>
    >>>

    >>

    >
    >



+ Reply to Thread