Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12532

.NET: Recognize fields with KeyAttribute and set QueryEntity.KeyFieldName

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: platforms
    • Labels:
    • Ignite Flags:
      Docs Required, Release Notes Required

      Description

      Populate QueryEntity.KeyFieldName automatically when System.ComponentModel.DataAnnotations.KeyAttribute is present. See QueryEntity.ScanAttributes.

      This:

      class Person
      {
          [QuerySqlField]
          [Key]
          public string EntityId {get; set;}
      }
      
      ...
      new QueryEntity(typeof(string), typeof(Person))
      

      Should be equivalent to this:

              <queryEntity keyFieldName="EntityId" keyType="System.String" tableName="ENTITIESTABLEINFO" valueType="ENTITIESTABLEINFO">
                <fields>
                  <queryField fieldType="System.String" name="EntityId" />
                </fields>
              </queryEntity>
      

        Attachments

          Activity

            People

            • Assignee:
              ptupitsyn Pavel Tupitsyn
              Reporter:
              ptupitsyn Pavel Tupitsyn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: