[OS-JIRA] Created: (CAY-314) PK Generation Improvements

From: jira-norepl..bjectstyle.org
Date: Sat May 07 2005 - 20:57:29 EDT

  • Next message: Holger Hoffstätte: "Re: Unit test coverage"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-314

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-314
        Summary: PK Generation Improvements
           Type: New Feature

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.2 [DEV]
       Versions:
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Sat, 7 May 2005 8:55 PM
        Updated: Sat, 7 May 2005 8:55 PM

    Description:
    Make PK generator smarter. General idea is to replace
       
    void createAutoPk(DataNode node, List dbEntities);

    with

    void createAutoPk(
       DataNode node,
       List dbEntities,
       int defaultStartValue,
       boolean checkCurrentValues);

    But this will only work if DbGenerator uses DataNode instead of raw SQL connection. Another problem is that PkGenerator has a number of methods that simply return SQL code without running it. This is useful for showing the users what will be executed (and also allows users to store the script and run it later), however it limits the possibilities for encapsulation of PK logic. ...

    I guess we'll have to stick with providing a SQL solution that can be executed outside of Cayenne (e.g. PL/SQL for Oracle). Don't see a way around it. However sql-generation methods of PkGenerator (and eventually DbAdapter) can be deprecated. Instead we should implement PKGenerators via SQLTemplates. Then we can run such SQLTemplate in two modes - "normal" for actual generation and "mock" for text SQL script output. This may depend on CAY-304 feature.

    This should provide new capabilities and make DbAdapter/PKGenerator API simpler and much more consistent.

       

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Sat May 07 2005 - 20:57:31 EDT