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

POJO validation against the schema.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha4
    • sql
    • Docs Required, Release Notes Required

    Description

      Let's verify POJO class is compatible with the current schema.

      • Mapper must bind all the key columns with the object fields, because missed key-column may lead to error/data loss.
      • Key and value columns must have different names, because otherwise these columns can't be mapped to a Record class.

      NB: Mapper result may not match the full schema for truncated objects.

      class BillingDetails {
          String owner;
      }
      
      class CreditCard extends BillingDetails {
             long cardNumber;
             int expYear;
             int expMonth;
      }
      
      KeyValueView<Long, CreditCard> credCardKvView = table.keyValueView(Long.class, CreditCard.class);
         
      // Truncated view.
      KeyValueView<Long, BillingDetails> billingDetailsKVView = table.keyValueView(Long.class, BillingDetails.class);
      

      Attachments

        Issue Links

          Activity

            People

              Berkov Alexander Belyak
              amashenkov Andrey Mashenkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h