Cayenne
  1. Cayenne
  2. CAY-1235

Implement qualifiers for DBEntities

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0M6
    • Fix Version/s: 3.0 beta 1, 3.0
    • Component/s: Core Library, Modeler
    • Labels:
      None

      Description

      This is much like ObjEntities qualifier, only applied on DBEntities level. This, for instance, means that it will be inserted in needed JOINs of any select, thus allowing to use restricting qualifiers in e.g. middle table of many-to-many flattened relationship.
      This issue includes core changes and modeler support

      1. 1235.diff
        12 kB
        Andrey Razumovsky

        Activity

        Hide
        Andrey Razumovsky added a comment -

        This is my implementation of the feature. The only disadvantage I see is that we cannot provide different qualifiers for different DBMS. Personally I don't think this is too important by now. So, if there aren't any objections I will add modeler support and commit next week

        Show
        Andrey Razumovsky added a comment - This is my implementation of the feature. The only disadvantage I see is that we cannot provide different qualifiers for different DBMS. Personally I don't think this is too important by now. So, if there aren't any objections I will add modeler support and commit next week
        Hide
        Andrey Razumovsky added a comment -

        Turns out we need some type of expressions for DBEntities, to correctly insert table prefix to a db entity qualifier, e.g.
        SELECT .... from p1 .... WHERE p1.deleted=false
        instead of
        SELECT .... from p1 .... WHERE deleted=false

        Show
        Andrey Razumovsky added a comment - Turns out we need some type of expressions for DBEntities, to correctly insert table prefix to a db entity qualifier, e.g. SELECT .... from p1 .... WHERE p1.deleted=false instead of SELECT .... from p1 .... WHERE deleted=false
        Hide
        Andrey Razumovsky added a comment -

        Now db entities support expression-like qualifiers. Attributes and relations can be used as always, but there's no need to add "db:" prefix since it will be inserted automatically.
        This also ensures expressions will be translated correctly to different DBMS

        Show
        Andrey Razumovsky added a comment - Now db entities support expression-like qualifiers. Attributes and relations can be used as always, but there's no need to add "db:" prefix since it will be inserted automatically. This also ensures expressions will be translated correctly to different DBMS

          People

          • Assignee:
            Andrey Razumovsky
            Reporter:
            Andrey Razumovsky
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development