Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    sqlStorageStrategy not working

    The version of MySQL I am using on a remote server does not accept a real Boolean column. So, I switched to TINYINT. In the reference I found sqlStorageStrategy and put it in a dataSource. The field name is 'Inactive'.
    Code:
    <DataSource ID="Project" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="PlanetProjectDB" schema="PUBLIC" tableName="Project" autoDeriveSchema="true">
        <fields>
            <field name="PROJECTID" type="sequence" primaryKey="true"/>
            <field name="COMMUNITYID" type="text" required="true" title="Community" foreignKey="Community.COMMUNITYID"/>
            <field name="PROJECTNUMBER" type="text" length="16" title="Number" canEdit="true"/>
            <field name="PROJECTTITLE" type="text" length="64" title="Title" canEdit="true"/>
            <field name="TASKORDER" type="text" length="32" title="Task Order" detail="true" canEdit="true"/>
            <field name="INACTIVE" type="boolean" sqlStorageStrategy="integer" title="Inactive" canEdit="true"/>
            <field name="OWNINGPROJECTID" type="text" title="Owning Project" foreignKey="OwningProject.PROJECTID" rootValue="null"/>
    		<field name="OWNINGPROJECTNUMBER" type="text" title="Owning Project" detail="false" canEdit="true" tableName="OwningProject" nativeName="PROJECTNUMBER"/>        
            <field name="PROJECTMANAGERID" type="text" title="Project Manager" canEdit="true" foreignKey="TeamMember.TEAMMEMBERID"/>
            <field name="PROJECTMANAGERNAME" type="text" title="Project Manager" detail="false" canEdit="true" tableName="TeamMember"  nativeName="TEAMMEMBERNAME"/>
            <field name="AGENDATEMPLATEID" type="text" required="true" title="Agenda Template" canEdit="true" foreignKey="AgendaTemplate.AGENDATEMPLATEID"/>
            <field name="AGENDAPRINTOPTIONS" type="text" length="2147483647" title="Agenda Options" detail="true" canEdit="true"/>
            <field name="MINUTESTEMPLATEID" type="text" required="true" title="Minutes Template" canEdit="true" foreignKey="MinutesTemplate.MINUTESTEMPLATEID"/>
            <field name="MINUTESPRINTOPTIONS" type="text" length="2147483647" title="Minutes Options" detail="true" canEdit="true"/>
            <field name="REPORTTEMPLATEID" type="text" required="true" title="Report Template" canEdit="true" foreignKey="ReportTemplate.REPORTTEMPLATEID"/>
            <field name="REPORTPRINTOPTIONS" type="text" length="2147483647" title="Report Options" detail="true" canEdit="true"/>        
            <field name="DESCRIPTION" type="text" length="2147483647" title="Description" detail="true" canEdit="true"/>
            <field name="LOG" type="text" length="2147483647" title="Log" detail="true"/>
            <field name="CREATED" type="creatorTimestamp" title="Created" detail="true"/>
            <field name="MODIFIED" type="modifierTimestamp" title="Modified" detail="true"/>
        </fields>
    	<operationBindings>
    		<OperationBinding>
    			<operationType>fetch</operationType>
    			<tableClause>Project LEFT JOIN TeamMember ON Project.PROJECTMANAGERID = TeamMember.TEAMMEMBERID LEFT JOIN Project OwningProject ON Project.OWNINGPROJECTID = OwningProject.PROJECTID</tableClause>  
    		</OperationBinding>
        </operationBindings>
        <title>Project</title>
        <titleField>PROJECTTITLE</titleField>
        <pluralTitle>Projects</pluralTitle>
        <generatedBy>SC_SNAPSHOT-2012-01-09_v8.2p/Pro Deployment 2012-01-09</generatedBy>
    </DataSource>
    However, it is not working. The database is being called to update a record with a *false* value. Not a zero. There is no custom update SQL.
    Code:
    === 2012-08-07 16:37:01,234 [sor1] DEBUG RPCManager - Processing 1 requests.
    === 2012-08-07 16:37:01,234 [sor1] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        criteria:{
            PROJECTID:101
        },
        values:{
            MODIFIED:new Date(1343059200000),
            CommunityID:101,
            Inactive:false,
            AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
    sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
    sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
    oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
    e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
    esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
    unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
    e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
    \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
    \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
            PROJECTID:101,
            LastIssueNumber:7,
            LOG:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
            Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
            Created:new Date(1344284730000),
            Modified:new Date(1343059200000),
            PROJECTTITLE:"SSN Suppression on checks for SSN Research",
            PROJECTMANAGERNAME:"Richard Bollinger",
            ProjectID:101,
            ProjectTitle:"SSN Suppression on checks for SSN Research",
            LastTaskNumber:5,
            Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
            DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
            CREATED:new Date(1344225600000),
            ProjectManagerID:101,
            ProjectNumber:"7633",
            PROJECTNUMBER:"7633",
            INACTIVE:false,
            COMMUNITYID:101,
            AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
    sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
    sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
    oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
    e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
    esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
    unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
    e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
    \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
    \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
            PROJECTMANAGERID:"101",
            _selection_19:true
        },
        operationConfig:{
            dataSource:"Project",
            operationType:"update"
        },
        componentId:"ProjectForm",
        appID:"builtinApplication",
        operation:"Project_update",
        oldValues:{
            MODIFIED:new Date(1343059200000),
            CommunityID:101,
            Inactive:false,
            AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
    sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
    sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
    oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
    e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
    esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
    unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
    e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
    \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
    \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
            PROJECTID:101,
            LastIssueNumber:7,
            LOG:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
            Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
            Created:new Date(1344284730000),
            Modified:new Date(1343059200000),
            PROJECTTITLE:"SSN Suppression on checks for SSN Research",
            PROJECTMANAGERNAME:"Richard Bollinger",
            ProjectID:101,
            ProjectTitle:"SSN Suppression on checks for SSN Research",
            LastTaskNumber:5,
            Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
            DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
            CREATED:new Date(1344268800000),
            ProjectManagerID:101,
            ProjectNumber:"7633",
            PROJECTNUMBER:"7633",
            INACTIVE:false,
            COMMUNITYID:101,
            AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
    sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
    sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
    oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
    e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
    esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
    unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
    e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
    \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
    \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
            PROJECTMANAGERID:101,
            _selection_19:true
        }
    }
    === 2012-08-07 16:37:01,234 [sor1] INFO  IDACall - Performing 1 operation(s)
    === 2012-08-07 16:37:01,234 [sor1] DEBUG AppBase - [builtinApplication.Project_update] No userTypes defined, allowing anyone
     access to all operations for this application
    === 2012-08-07 16:37:01,234 [sor1] DEBUG AppBase - [builtinApplication.Project_update] No public zero-argument method named
    '_Project_update' found, performing generic datasource operation
    === 2012-08-07 16:37:01,234 [sor1] DEBUG ValidationContext - [builtinApplication.Project_update] Adding validation errors at
     path '/Project/Inactive': {errorMessage=Must be a whole number.}
    === 2012-08-07 16:37:01,234 [sor1] INFO  Validation - [builtinApplication.Project_update] Validation error: [
        {
            Inactive:{
                errorMessage:"Must be a whole number."
            }
        }
    ]
    The sending formitem is a checkboxitem.

    I am running SmartClient Version: v8.2p_2012-07-19/EVAL Development Only on Mozilla Firefox 3.6.16 with Firebug using Windows XP Pro 32 bit.

    Thanks,

    Rick
    Last edited by RickBollinger; 7 Aug 2012, 12:06.

    #2
    Field names are case sensitive. You have a field named "INACTIVE" with a value being submitted as "Inactive".

    Comment


      #3
      Very quick response. I didn't think that would work because I had been experiencing no problems with all the field names in caps. But, y'all are the experts.

      So, I set the field name to 'Inactive'. I don't get the 'not a whole number' error. But, I am checking the checkBoxItem and setting it to 'true'. Yet, a zero ("0") value is found in the update SQL.

      The most telling part is where the log says
      Inactive=0, LOG='08/07/2012 17:45: Inactive changed to true
      Code:
      === 2012-08-07 17:46:31,609 [sor2] DEBUG RPCManager - Processing 1 requests.
      === 2012-08-07 17:46:31,625 [sor2] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          criteria:{
              PROJECTID:101
          },
          values:{
              LastTaskNumber:5,
              ProjectTitle:"SSN Suppression on checks for SSN Research",
              Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
              MODIFIED:new Date(1343059200000),
              CommunityID:101,
              DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
              Inactive:false,
              AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
      sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
      sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
      oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
      e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
      esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
      unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
      e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
      \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
      \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
              PROJECTID:101,
              LastIssueNumber:7,
              LOG:"08/07/2012 17:45: Inactive changed to true\n08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvh
      jnkml",
              CREATED:new Date(1344225600000),
              ProjectManagerID:101,
              ProjectNumber:"7633",
              Created:new Date(1344284730000),
              Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
              Modified:new Date(1343059200000),
              PROJECTTITLE:"SSN Suppression on checks for SSN Research",
              PROJECTNUMBER:"7633",
              PROJECTMANAGERNAME:"Richard Bollinger",
              COMMUNITYID:101,
              AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
      sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
      sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
      oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
      e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
      esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
      unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
      e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
      \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
      \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
              PROJECTMANAGERID:"101",
              ProjectID:101,
              _selection_24:true,
              _selection_19:true,
              INACTIVE:true
          },
          operationConfig:{
              dataSource:"Project",
              operationType:"update"
          },
          componentId:"ProjectForm",
          appID:"builtinApplication",
          operation:"Project_update",
          oldValues:{
              LastTaskNumber:5,
              ProjectTitle:"SSN Suppression on checks for SSN Research",
              Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
              MODIFIED:new Date(1343059200000),
              CommunityID:101,
              DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
              Inactive:false,
              AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
      sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
      sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
      oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
      e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
      esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
      unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
      e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
      \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
      \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
              PROJECTID:101,
              LastIssueNumber:7,
              LOG:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
              CREATED:new Date(1344268800000),
              ProjectManagerID:101,
              ProjectNumber:"7633",
              Created:new Date(1344284730000),
              Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
              Modified:new Date(1343059200000),
              PROJECTTITLE:"SSN Suppression on checks for SSN Research",
              PROJECTNUMBER:"7633",
              PROJECTMANAGERNAME:"Richard Bollinger",
              COMMUNITYID:101,
              AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
      sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
      sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
      oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
      e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
      esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
      unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
      e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
      \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
      \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
              PROJECTMANAGERID:101,
              ProjectID:101,
              _selection_24:true,
              _selection_19:true
          }
      }
      === 2012-08-07 17:46:31,812 [sor2] INFO  IDACall - Performing 1 operation(s)
      === 2012-08-07 17:46:31,843 [sor2] DEBUG AppBase - [builtinApplication.Project_update] No userTypes defined, allowing anyone
       access to all operations for this application
      === 2012-08-07 17:46:31,859 [sor2] DEBUG AppBase - [builtinApplication.Project_update] No public zero-argument method named
      '_Project_update' found, performing generic datasource operation
      === 2012-08-07 17:46:31,859 [sor2] INFO  SQLDataSource - [builtinApplication.Project_update] Performing update operation wit
      h
              criteria: {PROJECTID:101}       values: {LastTaskNumber:5,ProjectTitle:"SSN Suppression on checks for SSN Research",
      Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",MODIFIED:new Date(1344375991843),CommunityID:101,DESCRIPTION:"sercyfguthyijnml
      kl,;tcrgvhjnkml",Inactive:false,AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"T
      opicIssues\": true, \"IssueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"
      TopicTime\": true, \"SessionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"Impact
      Filter\": false, \"CategoryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": tr
      ue, \"IssueStatus\": true, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false
      , \"Private\": true, \"Resolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueL
      og\": true, \"IssueLogCount\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\":
      true, \"StartDate\": true, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate
      \": false, \"CreatedDate\": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\":
      \"Reverse\" }, \"Special\": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",PROJEC
      TID:101,LastIssueNumber:7,LOG:"08/07/2012 17:45: Inactive changed to true\n08/06/2012 16:55: Description changed to sercyfgu
      thyijnmlkl,;tcrgvhjnkml",ProjectManagerID:101,ProjectNumber:"7633",Created:new Date(1344284730000),Log:"08/06/2012 16:55: De
      scription changed to sercyfguthyijnmlkl,;tcrgvhjnkml",Modified:new Date(1343059200000),PROJECTTITLE:"SSN Suppression on chec
      ks for SSN Research",PROJECTNUMBER:"7633",PROJECTMANAGERNAME:"Richard Bollinger",COMMUNITYID:"101",AGENDAPRINTOPTIONS:"{ \"O
      ptions\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"IssueTasks\": true, \"IssueDetails\
      ": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"SessionType\": true, \"TopicDesc\":
      true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"CategoryFilter\": false, \"IssueTypeFi
      lter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": true, \"Category\": true, \"IssueDes
      c\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"Resolution\": false, \"OrigDueDate
      \": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCount\": 3, \"IssueLogUnit\": \"Ent
      ries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": true, \"TaskStatus\": true, \"TaskDe
      sc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": false, \"TaskLog\": false, \"
      TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special\": { \"IssueLikelihood\": false,
       \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",PROJECTMANAGERID:"101",ProjectID:101,_selection_24:true,_select
      ion_19:true,INACTIVE:true}
      === 2012-08-07 17:46:31,937 [sor2] INFO  SQLValuesClause - [builtinApplication.Project_update] Ignored data for non-existent
       or included columns: [_selection_24, _selection_19, INACTIVE]
      === 2012-08-07 17:46:31,953 [sor2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Project_update] DriverManager fe
      tching connection for PlanetProjectDB via jdbc url jdbc:mysql://localhost:3306/PUBLIC
      === 2012-08-07 17:46:31,953 [sor2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Project_update] Passing JDBC URL
       only to getConnection
      === 2012-08-07 17:46:31,984 [sor2] DEBUG PoolableSQLConnectionFactory - [builtinApplication.Project_update] Returning pooled
       Connection
      === 2012-08-07 17:46:32,000 [sor2] DEBUG SQLTransaction - [builtinApplication.Project_update] Started new PlanetProjectDB tr
      ansaction "1699326"
      === 2012-08-07 17:46:32,000 [sor2] INFO  SQLDriver - [builtinApplication.Project_update] Executing SQL update on 'PlanetProj
      ectDB': UPDATE PUBLIC.Project SET AGENDAPRINTOPTIONS='{ "Options": { "TopicDetails": true, "IncludeAttendees": true, "TopicI
      ssues": true, "IssueTasks": true, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true,
       "SessionType": true, "TopicDesc": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFi
      lter": false, "IssueTypeFilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": t
      rue, "IssueDesc": true, "Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "OrigDueDa
      te": false, "ModifiedDate": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "Is
      sueLogOrder": "Reverse" }, "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": true, "Owner": true
      , "OrigDueDate": false, "ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "En
      tries", "TaskLogOrder": "Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": fal
      se } }', AgendaPrintOptions='{ "Options": { "TopicDetails": true, "IncludeAttendees": true, "TopicIssues": true, "IssueTasks
      ": true, "IssueDetails": true, "TaskDetails": true }, "Topic": { "Leader": true, "TopicTime": true, "SessionType": true, "To
      picDesc": true, "ExpectedResults": true, "SearchEnabled": false, "ImpactFilter": false, "CategoryFilter": false, "IssueTypeF
      ilter": false, }, "Issue": { "DueDate": true, "IssueType": true, "IssueStatus": true, "Category": true, "IssueDesc": true, "
      Impact": true, "Owner": true, "Originator": false, "Private": true, "Resolution": false, "OrigDueDate": false, "ModifiedDate
      ": false, "CreatedDate": true, "IssueLog": true, "IssueLogCount": 3, "IssueLogUnit": "Entries", "IssueLogOrder": "Reverse" }
      , "Task": { "DueDate": true, "StartDate": true, "TaskStatus": true, "TaskDesc": true, "Owner": true, "OrigDueDate": false, "
      ModifiedDate": false, "CreatedDate": false, "TaskLog": false, "TaskLogCount": 3, "TaskLogUnit": "Entries", "TaskLogOrder": "
      Reverse" }, "Special": { "IssueLikelihood": false, "IssueImpactDesc": false, "SpecificDetails": false } }', COMMUNITYID='101
      ', CommunityID=101, Created='2012-08-06 16:25:30', DESCRIPTION='sercyfguthyijnmlkl,;tcrgvhjnkml', Description='sercyfguthyij
      nmlkl,;tcrgvhjnkml', Inactive=0, LOG='08/07/2012 17:45: Inactive changed to true
      08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml', LastIssueNumber=7, LastTaskNumber=5, Log='08/06/2
      012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml', MODIFIED='2012-08-07 17:46:31', Modified='2012-07-23 12:
      00:00', PROJECTMANAGERID='101', PROJECTNUMBER='7633', PROJECTTITLE='SSN Suppression on checks for SSN Research', ProjectID=1
      01, ProjectManagerID=101, ProjectNumber='7633', ProjectTitle='SSN Suppression on checks for SSN Research' WHERE (Project.PRO
      JECTID='101')
      === 2012-08-07 17:46:32,140 [sor1] INFO  Download - done streaming: D:/My Websites/Planet Project/isomorphic/skins/SilverWav
      e/images/Window/maximize_Over.png
      === 2012-08-07 17:46:32,156 [sor2] DEBUG SQLDataSource - [builtinApplication.Project_update] update operation affected 1 row
      s
      I still see some INACTIVE references. But, those must be the form fields.

      The reference says the 'integer' type used for boolean in this instance uses 0 for false and 1 for true.

      Rick

      Comment


        #4
        This log shows correct behavior. Inactive is shown as false in the inbound values, and the SQL UPDATE changes the column value to 0 as expected.

        The part of the log that shows "Inactive changed to true" is part of some text data that you are inserting. It is not something the SmartGWT server is logging.

        Comment


          #5
          I humbly have a different interpretation.

          When I pull the pertinent phrases out of the SQL statement I see the new value for 'Inactive' is zero. And, an update to the 'Log' showing a value of 'true' was attempted.

          Code:
          UPDATE PUBLIC.Project SET ... Inactive=0, LOG='08/07/2012 7:45: Inactive changed to true...' 
          WHERE (Project.PROJECTID='101')
          I feel guilty bringing this up. Because, I notice that in the full SQL statement, there are repeated phrases for individual columns. Not always together.
          COMMUNTYID='101', CommunityID=101 ... PROJECTMANAGERID='101, ProjectManagerID=101
          My assessment is that something screwball is going on that I don't understand. And, when that happens all bets are off. In a Bizarro world anything can happen and for no reason. So, I need to take the dataSource in question and change all the field names to match the case of the column names. Whatever mechanism let me get away with using all caps I cannot depend on to work in all situations.

          I will put things right in a test case and report back.

          Thanks,

          Rick

          Comment


            #6
            Sorry but once again, the logs show the server behaving correct.ly Your log - that is, the text value you are inserting which is not generated by the SmartGWT framework - shows some other stuff which may well be incorrect, but that would be some kind of application-level issue in other code.

            Comment


              #7
              I have been going at my problem incorrectly. I like y'all. I get good advice. It has not escaped my notice that I get replies on a Sunday when I have no such reasonable expectation.

              What I really want is a solution to my problem. I had to switch my database to MySQL and it is not quite working out. Rather than focusing on minutia, let me just give the current situation and ask the best way to implement.

              I have a database with what used to be a BOOLEAN column. Now it (Inactive) is TINYINT.

              Code:
              CREATE TABLE Project(
              		ProjectID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
              		CommunityID BIGINT NOT NULL,
              		ProjectNumber VARCHAR(16) NOT NULL,
              		ProjectTitle VARCHAR(64),
              		TaskOrder VARCHAR(32),
              		Inactive TINYINT DEFAULT 0,
              		OwningProjectID BIGINT,
              		ProjectManagerID BIGINT NOT NULL,
              		LastIssueNumber INT DEFAULT 0,
              		LastTaskNumber INT DEFAULT 0,
              		AgendaTemplateID BIGINT,
              		AgendaPrintOptions TEXT(32767),
              		MinutesTemplateID BIGINT,
              		MinutesPrintOptions TEXT(32767),
              		ReportTemplateID BIGINT,
              		ReportPrintOptions TEXT(32767),
              		Description TEXT(32767),
              		Log TEXT(32767),
              		Created TIMESTAMP,
              		Modified TIMESTAMP DEFAULT '2012-07-23 12:00:00',
              	
              	CONSTRAINT IDX_ProjectNumber UNIQUE (CommunityID, ProjectNumber),
              
              	CONSTRAINT IDX_ProjectTitle UNIQUE (CommunityID, ProjectTitle),
              	CONSTRAINT IDX_TaskOrder UNIQUE (CommunityID, TaskOrder),
              	CONSTRAINT IDX_Project_ProjectManager FOREIGN KEY (ProjectManagerID) REFERENCES TeamMember (TeamMemberID),
              	CONSTRAINT IDX_Project_Community FOREIGN KEY (CommunityID) REFERENCES Community (CommunityID),
              	CONSTRAINT IDX_Project_AgendaTemplate FOREIGN KEY (AgendaTemplateID) REFERENCES AgendaTemplate (AgendaTemplateID),
              	CONSTRAINT IDX_Project_MinutesTemplate FOREIGN KEY (MinutesTemplateID) REFERENCES MinutesTemplate (MinutesTemplateID),
              	CONSTRAINT IDX_Project_ReportTemplate FOREIGN KEY (ReportTemplateID) REFERENCES ReportTemplate (ReportTemplateID)
              )	AUTO_INCREMENT = 101;
              I access it in a dataSource.
              Code:
                      INACTIVE:{
                          canEdit:true,
                          name:"INACTIVE",
                          nativeName:"Inactive",
                          sqlStorageStrategy:"integer",
                          title:"Inactive",
                          type:"boolean"
                      },
              And, I present it on a dynamicForm using a checkBoxItem.
              Code:
                      {
                          name:"INACTIVE",
                          title:"Inactive",
                          valueMap:[0,1],
                          _constructor:"CheckboxItem"
                      },
              Which fails when I save the record on a validation error. I don't even get near to an SQL UPDATE statement. I just get the note in the log that a whole number is required.

              The framework is great. This should be easy. I just don't know how to make it happen, apparently.

              Thanks,

              Rick

              Comment


                #8
                sqlStorageStrategy is the correct way to do this and the only logs you have shared show that it is working correctly.

                You should remove the valueMap on the CheckBoxItem - this is not correct - but it has not prevented the feature from working.

                Comment


                  #9
                  Aye! Cap'n. I got rid of the valuemap on the checkbox.

                  Code:
                          {
                              name:"INACTIVE",
                              title:"Inactive",
                              _constructor:"CheckboxItem"
                          },
                  I have applied sqlStorageStrategy.
                  Code:
                          INACTIVE:{
                              canEdit:true,
                              name:"INACTIVE",
                              nativeName:"Inactive",
                              sqlStorageStrategy:"integer",
                              title:"Inactive",
                              type:"boolean"
                          },
                  I clicked on the checkbox and hit SAVE. There was no response on the screen (see attached picture). At the end of the console log was a validation error. This did not show up on the screen.
                  Code:
                  === 2012-08-09 15:06:15,100 [sor8] INFO  IDACall - Performing 1 operation(s)
                  === 2012-08-09 15:06:15,100 [sor8] DEBUG AppBase - [builtinApplication.Project_update] No userTypes defined, allowing anyone
                   access to all operations for this application
                  === 2012-08-09 15:06:15,100 [sor8] DEBUG AppBase - [builtinApplication.Project_update] No public zero-argument method named
                  '_Project_update' found, performing generic datasource operation
                  === 2012-08-09 15:06:15,116 [sor3] INFO  Download - done streaming: D:/My Websites/Planet Project/isomorphic/skins/SilverWav
                  e/images/button/button_Focused_Down_end.png
                  === 2012-08-09 15:06:15,131 [sor8] DEBUG ValidationContext - [builtinApplication.Project_update] Adding validation errors at
                   path '/Project/Inactive': {errorMessage=Must be a whole number.}
                  === 2012-08-09 15:06:15,131 [sor8] INFO  Validation - [builtinApplication.Project_update] Validation error: [
                      {
                          Inactive:{
                              errorMessage:"Must be a whole number."
                          }
                      }
                  ]
                  === 2012-08-09 15:06:15,162 [sor8] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
                  === 2012-08-09 15:06:15,162 [sor8] DEBUG RPCManager - non-DMI response, dropExtraFields: false
                  === 2012-08-09 15:06:15,162 [sor8] INFO  Compression - /isomorphic/IDACall: 207 -> 178 bytes
                  Just before that in the console log I see the project record I was trying to update.
                  Code:
                  === 2012-08-09 15:06:14,803 [sor8] DEBUG RPCManager - Processing 1 requests.
                  === 2012-08-09 15:06:14,819 [sor8] DEBUG RPCManager - Request #1 (DSRequest) payload: {
                      criteria:{
                          PROJECTID:101
                      },
                      values:{
                          MODIFIED:new Date(1343059200000),
                          CommunityID:101,
                          Inactive:false,
                          AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
                  sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
                  sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
                  oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
                  e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
                  esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
                  unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
                  e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
                  \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
                  \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
                          PROJECTID:101,
                          LastIssueNumber:7,
                          LOG:"08/09/2012 15:06: Inactive changed from false to true\n08/06/2012 16:55: Description changed to sercyfguthyijnm
                  lkl,;tcrgvhjnkml",
                          Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
                          Created:new Date(1344284730000),
                          Modified:new Date(1343059200000),
                          PROJECTTITLE:"SSN Suppression on checks for SSN Research",
                          PROJECTMANAGERNAME:"Richard Bollinger",
                          ProjectID:101,
                          ProjectTitle:"SSN Suppression on checks for SSN Research",
                          LastTaskNumber:5,
                          Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                          DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                          CREATED:new Date(1344225600000),
                          ProjectManagerID:101,
                          ProjectNumber:"7633",
                          PROJECTNUMBER:"7633",
                          INACTIVE:true,
                          COMMUNITYID:101,
                          AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
                  sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
                  sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
                  oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
                  e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
                  esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
                  unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
                  e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
                  \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
                  \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
                          PROJECTMANAGERID:101,
                          _selection_19:true
                      },
                      operationConfig:{
                          dataSource:"Project",
                          operationType:"update"
                      },
                      componentId:"ProjectForm",
                      appID:"builtinApplication",
                      operation:"Project_update",
                      oldValues:{
                          MODIFIED:new Date(1343059200000),
                          CommunityID:101,
                          Inactive:false,
                          AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
                  sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
                  sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
                  oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
                  e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
                  esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
                  unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
                  e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
                  \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
                  \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
                          PROJECTID:101,
                          LastIssueNumber:7,
                          LOG:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
                          Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
                          Created:new Date(1344284730000),
                          Modified:new Date(1343059200000),
                          PROJECTTITLE:"SSN Suppression on checks for SSN Research",
                          PROJECTMANAGERNAME:"Richard Bollinger",
                          ProjectID:101,
                          ProjectTitle:"SSN Suppression on checks for SSN Research",
                          LastTaskNumber:5,
                          Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                          DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                          CREATED:new Date(1344268800000),
                          ProjectManagerID:101,
                          ProjectNumber:"7633",
                          PROJECTNUMBER:"7633",
                          INACTIVE:false,
                          COMMUNITYID:101,
                          AGENDAPRINTOPTIONS:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
                  sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
                  sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
                  oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
                  e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
                  esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
                  unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
                  e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
                  \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
                  \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
                          PROJECTMANAGERID:101,
                          _selection_19:true
                      }
                  }
                  I note that it is showing Inactive:false instead of Inactive:0. This is a surprise because the database has a 0 in it.

                  Code:
                  mysql> select projectid, projectnumber, inactive from project;
                  +-----------+---------------+----------+
                  | projectid | projectnumber | inactive |
                  +-----------+---------------+----------+
                  |       101 | 7633          |        0 |
                  |       102 | 8997          |        0 |
                  |       103 | 9066          |        0 |
                  |       104 | 9300          |        0 |
                  +-----------+---------------+----------+
                  4 rows in set (0.00 sec)
                  Appropriate because the column was declared TINYINT.
                  Code:
                  CREATE TABLE Project(
                  		ProjectID BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT,
                  		CommunityID BIGINT NOT NULL,
                  		ProjectNumber VARCHAR(16) NOT NULL,
                  		ProjectTitle VARCHAR(64),
                  		TaskOrder VARCHAR(32),
                  		Inactive TINYINT DEFAULT 0,
                  		OwningProjectID BIGINT,
                  		ProjectManagerID BIGINT NOT NULL,
                  		LastIssueNumber INT DEFAULT 0,
                  		LastTaskNumber INT DEFAULT 0,
                  		AgendaTemplateID BIGINT,
                  		AgendaPrintOptions TEXT(32767),
                  		MinutesTemplateID BIGINT,
                  		MinutesPrintOptions TEXT(32767),
                  		ReportTemplateID BIGINT,
                  		ReportPrintOptions TEXT(32767),
                  		Description TEXT(32767),
                  		Log TEXT(32767),
                  		Created TIMESTAMP,
                  		Modified TIMESTAMP DEFAULT '2012-07-23 12:00:00',
                  	
                  	CONSTRAINT IDX_ProjectNumber UNIQUE (CommunityID, ProjectNumber),
                  
                  	CONSTRAINT IDX_ProjectTitle UNIQUE (CommunityID, ProjectTitle),
                  	CONSTRAINT IDX_TaskOrder UNIQUE (CommunityID, TaskOrder),
                  	CONSTRAINT IDX_Project_ProjectManager FOREIGN KEY (ProjectManagerID) REFERENCES TeamMember (TeamMemberID),
                  	CONSTRAINT IDX_Project_Community FOREIGN KEY (CommunityID) REFERENCES Community (CommunityID),
                  	CONSTRAINT IDX_Project_AgendaTemplate FOREIGN KEY (AgendaTemplateID) REFERENCES AgendaTemplate (AgendaTemplateID),
                  	CONSTRAINT IDX_Project_MinutesTemplate FOREIGN KEY (MinutesTemplateID) REFERENCES MinutesTemplate (MinutesTemplateID),
                  	CONSTRAINT IDX_Project_ReportTemplate FOREIGN KEY (ReportTemplateID) REFERENCES ReportTemplate (ReportTemplateID)
                  )	AUTO_INCREMENT = 101;
                  What other diagnostics can I supply to help?

                  Thanks,

                  Rick
                  Attached Files

                  Comment


                    #10
                    You previously showed a log with a successful save with no validation error. Just revert to that.

                    We're not sure why you made further changes from that point in the first place, but the log suggests you've changed the type of the field in the .ds.xml file to "integer" instead of "boolean" (which would be incorrect).

                    Comment


                      #11
                      Such a quick reply. It takes me longer. I have to get out of Eclipse.

                      I don't remember having a successful save yet. I have a bottle of scotch waiting to open when I do. In any event, I have not committed after every tweak. So, just reverting is not possible. Good idea, though.

                      I have not changed the type of the field in the .ds.xml file. It was, and still is, declared type="boolean" sqlStorageStrategy="integer".
                      Code:
                      <DataSource ID="Project" dataFormat="iscServer" serverType="sql" dataSourceVersion="1" dbName="PlanetProjectDB" schema="PUBLIC" tableName="Project" autoDeriveSchema="true">
                          <fields>
                              <field name="PROJECTID" nativeName="ProjectID" type="sequence" primaryKey="true"/>
                              <field name="COMMUNITYID" nativeName="CommunityID" type="integer" required="true" title="Community" foreignKey="Community.CommunityID"/>
                              <field name="PROJECTNUMBER" nativeName="ProjectNumber" type="text" length="16" title="Number" canEdit="true"/>
                              <field name="PROJECTTITLE" nativeName="ProjectTitle" type="text" length="64" title="Title" canEdit="true"/>
                              <field name="TASKORDER" nativeName="TaskOrder" type="text" length="32" title="Task Order" detail="true" canEdit="true"/>
                              <field name="INACTIVE" nativeName="Inactive" type="boolean" sqlStorageStrategy="integer" title="Inactive" canEdit="true"/>
                              <field name="OWNINGPROJECTID" nativeName="OwningProjectID" type="integer" title="Owning Project" foreignKey="OwningProject.ProjectID" rootValue="null"/>
                      		<field name="OWNINGPROJECTNUMBER" nativeName="ProjectNumber" type="text" title="Owning Project" detail="false" canEdit="true" tableName="OwningProject"/>        
                              <field name="PROJECTMANAGERID" nativeName="ProjectManagerID" type="integer" title="Project Manager" canEdit="true" foreignKey="TeamMember.TeamMemberID"/>
                              <field name="PROJECTMANAGERNAME"  nativeName="TeamMemberName" type="text" title="Project Manager" detail="false" canEdit="true" tableName="TeamMember"/>
                              <field name="AGENDATEMPLATEID" nativeName="AgendaTemplateID" type="integer" required="true" title="Agenda Template" canEdit="true" foreignKey="AgendaTemplate.AgendaTemplateID"/>
                              <field name="AGENDAPRINTOPTIONS" nativeName="AgendaPrintOptions" type="text" length="2147483647" title="Agenda Options" detail="true" canEdit="true"/>
                              <field name="MINUTESTEMPLATEID" nativeName="MinutesTemplateID" type="integer" required="true" title="Minutes Template" canEdit="true" foreignKey="MinutesTemplate.MinutesTemplateID"/>
                              <field name="MINUTESPRINTOPTIONS" nativeName="MinutesPrintOptions" type="text" length="2147483647" title="Minutes Options" detail="true" canEdit="true"/>
                              <field name="REPORTTEMPLATEID" nativeName="ReportTemplateID" type="integer" required="true" title="Report Template" canEdit="true" foreignKey="ReportTemplate.ReportTemplateID"/>
                              <field name="REPORTPRINTOPTIONS" nativeName="ReportPrintOptions" type="text" length="2147483647" title="Report Options" detail="true" canEdit="true"/>        
                              <field name="DESCRIPTION" nativeName="Description" type="text" length="2147483647" title="Description" detail="true" canEdit="true"/>
                              <field name="LOG" nativeName="Log" type="text" length="2147483647" title="Log" detail="true"/>
                              <field name="CREATED" nativeName="Created" type="creatorTimestamp" title="Created" detail="true"/>
                              <field name="MODIFIED" nativeName="Modified" type="modifierTimestamp" title="Modified" detail="true"/>
                          </fields>
                      	<operationBindings>
                      		<OperationBinding>
                      			<operationType>fetch</operationType>
                      			<tableClause>Project LEFT JOIN TeamMember ON Project.ProjectManagerID = TeamMember.TeamMemberID LEFT JOIN Project OwningProject ON Project.OwningProjectID = OwningProject.ProjectID</tableClause>  
                      		</OperationBinding>
                          </operationBindings>
                          <title>Project</title>
                          <titleField>PROJECTTITLE</titleField>
                          <pluralTitle>Projects</pluralTitle>
                          <generatedBy>SC_SNAPSHOT-2012-01-09_v8.2p/Pro Deployment 2012-01-09</generatedBy>
                      </DataSource>
                      I don't know enough about the inner workings of the framework to suggest a fix.

                      Thanks,

                      Rick

                      Comment


                        #12
                        Post #3 (yours) shows a log with a successful update of the Inactive field.

                        You still haven't corrected the problem we pointed out in our first reply (post #2) - you still have a field with name "INACTIVE" and a submitted value with name "Inactive". Field names are case sensitive.

                        Comment


                          #13
                          I left the field names in caps because I use a lot of displayValues for IDs and NAMEs. I just gave all the datasource fields a nativeName to match the column names.

                          If I am correct in my assumptions, what you say is a 'submitted' value would be in the values for an update. Here they are in the example you cite in post #3. Note the two (2) entries in this object for 'Inactive' and 'INACTIVE'.
                          Code:
                              values:{
                                  MODIFIED:new Date(1343059200000),
                                  CommunityID:101,
                                  Inactive:false,
                                  AgendaPrintOptions:"{ \"Options\": { \"TopicDetails\": true, \"IncludeAttendees\": true, \"TopicIssues\": true, \"Is
                          sueTasks\": true, \"IssueDetails\": true, \"TaskDetails\": true }, \"Topic\": { \"Leader\": true, \"TopicTime\": true, \"Ses
                          sionType\": true, \"TopicDesc\": true, \"ExpectedResults\": true, \"SearchEnabled\": false, \"ImpactFilter\": false, \"Categ
                          oryFilter\": false, \"IssueTypeFilter\": false, }, \"Issue\": { \"DueDate\": true, \"IssueType\": true, \"IssueStatus\": tru
                          e, \"Category\": true, \"IssueDesc\": true, \"Impact\": true, \"Owner\": true, \"Originator\": false, \"Private\": true, \"R
                          esolution\": false, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate\": true, \"IssueLog\": true, \"IssueLogCo
                          unt\": 3, \"IssueLogUnit\": \"Entries\", \"IssueLogOrder\": \"Reverse\" }, \"Task\": { \"DueDate\": true, \"StartDate\": tru
                          e, \"TaskStatus\": true, \"TaskDesc\": true, \"Owner\": true, \"OrigDueDate\": false, \"ModifiedDate\": false, \"CreatedDate
                          \": false, \"TaskLog\": false, \"TaskLogCount\": 3, \"TaskLogUnit\": \"Entries\", \"TaskLogOrder\": \"Reverse\" }, \"Special
                          \": { \"IssueLikelihood\": false, \"IssueImpactDesc\": false, \"SpecificDetails\": false } }",
                                  PROJECTID:101,
                                  LastIssueNumber:7,
                                  LOG:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
                                  Log:"08/06/2012 16:55: Description changed to sercyfguthyijnmlkl,;tcrgvhjnkml",
                                  Created:new Date(1344284730000),
                                  Modified:new Date(1343059200000),
                                  PROJECTTITLE:"SSN Suppression on checks for SSN Research",
                                  PROJECTMANAGERNAME:"Richard Bollinger",
                                  ProjectID:101,
                                  ProjectTitle:"SSN Suppression on checks for SSN Research",
                                  LastTaskNumber:5,
                                  Description:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                                  DESCRIPTION:"sercyfguthyijnmlkl,;tcrgvhjnkml",
                                  CREATED:new Date(1344225600000),
                                  ProjectManagerID:101,
                                  ProjectNumber:"7633",
                                  PROJECTNUMBER:"7633",
                                  INACTIVE:false,
                          The checkBoxItem on the form is 'INACTIVE':
                          Code:
                           <FormItem name="INACTIVE" title="Inactive" constructor="CheckboxItem"/>
                          The field name in the dataSource is 'INACTIVE':
                          Code:
                          <field name="INACTIVE" nativeName="Inactive" type="boolean" sqlStorageStrategy="integer" title="Inactive" canEdit="true"/>
                          Somehow, the lower case version (Inactive) is being generated along with the correct one (INACTIVE).

                          The example you cite as working shows a form value of 'true' being translated to 0.
                          Code:
                          ..., Inactive=0, LOG='08/07/2012 17:45: Inactive changed to true...
                          There were no validation or SQL errors. But, an incorrect value was submitted.

                          If you think it would help, I will get rid of all the nativeNames and change all the ds and form item names to not be all CAPS.

                          I would rather avoid a problem than solve it. What do you think?

                          Thanks,

                          Rick

                          Comment


                            #14
                            false->0 is a correct translation based on sqlStorageStrategy.

                            You should not be submitting both an upper and mixed case value. Remove the mixed case value since it doesn't match the field name.

                            Unless you have unusual database settings, your database is not case-sensitive regarding column names. Your nativeName settings do nothing and can be removed.

                            Comment


                              #15
                              I have successfully avoided this problem. I was not submitting upper and mixed case [labeled] values on purpose. I eliminated this artifact by totally eliminating all field names in CAPS in my datasources, my code and everywhere. I also got rid of the unecessary nativeName clauses.

                              With all your assistance, now, I have succeeded in getting my application up and running on a remote server, accessing and updating its MySQL database.

                              There is still a ways to go, but I just wanted y'all to know how much I appreciate the help I received just getting to this very important milestone.

                              Thanks,

                              Rick

                              Comment

                              Working...
                              X