Re: EJBQL client-side challenge

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Tue Jan 26 2010 - 09:50:30 EST

  • Next message: Andrus Adamchik: "Re: EJBQL client-side challenge"

    On 27/01/2010, at 12:52 AM, Khailenko Ksenia wrote:

    > Does the scenario at
    > org.apache.cayenne.CayenneContextEJBQLTest.testEJBQLSelect() satisfy to the
    > conditions you are talking about?
    > Because in such a case we have the DbEntity with name "MT_TABLE1" and the
    > ObjEntity with name "MtTable1" - they are different, aren't they?

    Strictly speaking, yes. But you could also say that one is a derivative of the other. e.g., upper-casing camel casing and joined via underscore which is a common db mapping (which perhaps cayenne allows for, especially when reverse engineering).

    > This test
    > successfully passes with query "SELECT a FROM MtTable1 a", and fails on
    > query "SELECT COUNT(a) FROM MtTable1 a" but not for the reason that you
    > have, but because there is a problem with the processing scalar results.
    > Could you give a more concrete example if I misunderstood the problem?

    DbEntity name -> Foo
    ObjEntity name -> Bar.

    No similarities.

    > 2010/1/26 Lachlan Deck <lachlan.dec..mail.com>
    >
    >> On 26/01/2010, at 6:51 PM, Andrus Adamchik wrote:
    >>
    >>> Will need to investigate that. Could be a bug. IIRC we officially
    >> supported EJBQL on the client.
    >>
    >> Sure. Just to be clear, this error only occurs if the DbEntity name differs
    >> from the ObjEntity name. Similar problems would occur (I imagine) with
    >> property names.
    >>
    >>>
    >>> Andrus
    >>>
    >>> On Jan 26, 2010, at 2:10 AM, Lachlan Deck wrote:
    >>>
    >>>> On 25/01/2010, at 6:19 PM, Andrus Adamchik wrote:
    >>>>
    >>>>>> I realise that the original reasoning for this was security
    >>>>>
    >>>>> This and also a general desire to encapsulate as many server details as
    >> possible.
    >>>>>
    >>>>>> this presents a challenge for utilising EJBQ
    >>>>>
    >>>>> EJBQL should work without knowledge of DbEntity. What errors are you
    >> getting? We may be able to fix by fixing processing pipeline.
    >>>>
    >>>> If you use a simple query such as 'SELECT COUNT(a) FROM
    >> SomeEntityName....' the error returned is that no such Table/View exists.
    >>>>
    >>>> with regards,
    >>>> --
    >>>>
    >>>> Lachlan Deck
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>
    >> with regards,
    >> --
    >>
    >> Lachlan Deck
    >>
    >>
    >>
    >>
    >
    >
    > --
    > Regards, Ksenia Khailenko

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Tue Jan 26 2010 - 09:51:14 EST