[jira] Commented: (CAY-1122) Add setColumnNamesCapitalization(String columnNameCapitalization) method to NamedQuery class

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Mon Oct 13 2008 - 06:58:11 EDT

  • Next message: Artyom Sokolov (JIRA): "[jira] Created: (CAY-1123) Add UUID support"

        [ https://issues.apache.org/cayenne/browse/CAY-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13162#action_13162 ]

    Andrus Adamchik commented on CAY-1122:
    --------------------------------------

    then it is a different kind of bug. Let me look into that.

    > Add setColumnNamesCapitalization(String columnNameCapitalization) method to NamedQuery class
    > --------------------------------------------------------------------------------------------
    >
    > Key: CAY-1122
    > URL: https://issues.apache.org/cayenne/browse/CAY-1122
    > Project: Cayenne
    > Issue Type: New Feature
    > Components: Cayenne Core Library
    > Affects Versions: 3.0
    > Reporter: Artyom Sokolov
    > Assignee: Andrus Adamchik
    >
    > Currently to achieve the same functionality we need to write next code:
    > SQLTemplate query = (SQLTemplate) dataContext.getEntityResolver().lookupQuery("GetUris");
    > query.setColumnNamesCapitalization(SQLTemplate.UPPERCASE_COLUMN_NAMES);
    > List<Uri> uris = dataContext.performQuery(query);
    > It could be much better to write just this:
    > NamedQuery query = new NamedQuery("GetUris");
    > query.setColumnNamesCapitalization(SQLTemplate.UPPERCASE_COLUMN_NAMES);
    > List<Uri> uris = dataContext.performQuery(query);
    > Code without casts looks more pretty and clean... doesn't it? :)

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Mon Oct 13 2008 - 06:59:08 EDT